Jump to content

include() hell (local and remote host)


colombian

Recommended Posts

How do I include files in such a way that they would work with both a localhost and remote host?

Relative paths are ok for some of the things, but the problems are the files that need to reference the entire path from root.

 

Another include issue, is that I wish the paths within the include file, were taken relatively to the file calling it, instead of remaining relative to the include file.

I trie the include dirname(__FILE__).'/../bla.php'); without any success at all.

 

I have been developing and testing on a remote server for a long time. And I can get all these files to work with relative paths to the remote server, but I cannot get them to work for both remote and localhost - which would be great. Like the relative include for ASP.

 

Yes, I searched google, the forums and just about everywhere, and I didn't see anything that addresses this directly.

 

Thank you in advance for any help you can provide.

 

Link to comment
https://forums.phpfreaks.com/topic/51919-include-hell-local-and-remote-host/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.