Jump to content

help with PHP relative paths for includes


buvwon

Recommended Posts

OK... so here's the problem with my site.  It was working perfectly and then my host did some sort of upgrade that included phpSuExec.  What happened, though is that all of my includes are no longer being found.

 

The way the includes are being processed has changed due to the update.  The includes and the library files.  Before, it could just say "include < xxx.php>" or whatever the appropriate syntax is.  Now, it is demanding a file relative path to locate the include, such as "include <../library/xxx.php>.  I have gone through and fixed a number of these.  The problem is that even if I took the time to go through and fix every single include, it seems that in some cases I may fix it for one file, but it will be wrong for another.  That is, if a file calls an include called functions.php which then in turn calls a file called config.php, I can't write an appropriate document relative path because the files calling functions.php are in different folder levels.  So for one, ../library/config.php may be an appropriate path, while for another, library/config.php may be the correct path.  Do you understand what I am saying?

 

The point is, is there a way to turn back on the behavior that existed before the update which was that if a file called an include, it would automatically look in library and include folders?

 

Thanks!

 

 

Link to comment
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.