Hey guys.
I'm having a little trouble with relative paths in PHP.
Basically what I need to do is include scripts. So I have it set up that each php page requires/includes certain scripts to run the page. Unfortunately I keep getting an error stating:
Warning: main(./../connection.php): failed to open stream: No such file or directory in /home/winfield/public_html/test/admin/scripts/sidebar/events.php on line 3
Fatal error: main(): Failed opening required './../connection.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/winfield/public_html/test/admin/scripts/sidebar/events.php on line 3
So my question, is how do I work around this short of including each script that i need within each sub-directory.
Short & Sweet of it
I want to include files from above the working directory (admin/) and they have requirements to include other scripts from above their directory. Is there a way I can designate to always make things relative to the scripts home directory?
Thanks for the help.
~Brett