Let's say I have file1 and it calls file2.php like so:
Now if I were to save file1.php into another folder the above would no longer work. I tried just adding a "/" in front of file2.php but that just errors out because it then goes back to the root of the PHP include path that is defined in php.ini.
In a perfect world, say I moved file1.php two folders deep for some reason. The include would still work because even though I never touched file1.php it would still write out in the code:
So it seems that I would clearly need some variable that would update itself based on where the file and concatenate it to "file2.php" in this case.
I've tried a ton of $_SERVER variables though and have had no luck. I'm starting to get the feeling that I'm making this a lot harder than it actually is.
Any help would be greatly appreciated.