I have the following code (simplified) to add a path to my include paths (to temporarily fix an website with old code).
set_include_path(get_include_path() . PATH_SEPARATOR . '/foo/bar');
I have a settings file /foo/settings/settings.inc.php
Now when I have set the include path and I am in a file /foo/bar/members.php
I want to include the settings file. So what the code does is:
include '../settings/settings.inc.php'
I would think that it would get that file now. But it doesn't. When I put the full path in the include it does work. eg: /foo/settings/settings.inc.php
but there are a lot of files. And I thought that this would be a work around for that so I don't have to replace every file manually.