Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.