Thanx, but the script works fine with this include structure. I just need to get rid of the warnings.


Niklas lampén wrote:

Is the situation this:
/home/a.php includes page /home/lib/b.php which includes /home/lib/c.php?

If I recall correctly, when you include a file in an included file, the script is run in the directory where a.php is located. So you need to include files based on that directory.

I recommend you to set in a.php variable $RootDir to '/home/' and to do all including based on that.

a.php: require($RootDir . 'lib/b.php');
b.php: require($RootDir . 'lib/c.php');

This assumes you never use b.php without including it from a.php. To avoid this assuming I use settings file in projects that has to be portable and include that file to every single page of the project.


Niklas




--
Please reply to the list and not to my email directly.
I use usenet server and do not check yahoo email account.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to