I have multiple libraries that I need to include, some of the libraries depend on each other.
if I hav a file called "foo.php" and I include a file in another directory, ie: include_once('libraries/bar.php'). I also have an include in that file, however the include in "bar.php" seems to be relitive to foo.php.
...and since I have many files from diff directories including bar.php, I am forced to use absolute paths (which I hate using).
is there a way around this. I am a C programmer and the include in C is always relitive to the that file.
ex:
/foo.php
include_once('libs/bar.php');
/somedir/fooooo.php
include_once('../libs/bar.php');
/libs/bar.php
include_once('anotherlib.php');
/libs/anotherlib.php
'bar.php' does not include 'anotherlib.php' unless I use absolute path even though they are in the same dir.