Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
Re: The principle of include files in PHP, not as in C++
I gave you a perfectly serviceable solution.
1. Store current working dir somewhere ( $cwd = getcwd(); ).
2. Set current working dir to the one of the file =
( chdir(dirname(__FILE__)); ).
3. Do a relative include/require/fopen/etc..
4. Restore the current working dir to the one you stored ( chdir($cwd); =