Re: include problem

From: Date: Wed, 29 Oct 2003 22:03:41 +0000
Subject: Re: include problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-168079@lists.php.net to get a copy of this message
Few days ago I asked the same question and got several excellent answers that helped me to solve the same problem - check the mailing list for 'including files from different sub directories' on 24-10-2003. Nevertheless all those suggestions helped me to solve the problem from a normal browser point of view, I still have some troubles with avoiding the same error messages while editing my php staff, that means the development environment which I use (Eclipse + some plugins) can't handle the include/require directives correctly. Perhaps you may face the same issue .. ?? Allex Pablo S. Torralba wrote:
Hi, I have a weird problem which must be stupid for sure. I'm trying to do an include in my code run as a cgi. The include works fine in the form: include ("directory/file"); even it works as: include ("directory/../directory/file"); but it doesn't work as: include ("./directory/file"); nor include ("../current/directory/file"). Of course, the obvious thinking is I have a perms problem but they are the same for '.' and for 'directory' so it makes no sense for me (755 if you wonder). If I execute the script it works without problem but it doesn't upon web request reporting: Warning: main(./db/db.tables.php) [function.main]: failed to create stream: No such file or directory in /home/psanchez/tests/hola.php on line 8 Warning: main() [function.main]: Failed opening './db/db.tables.php' for inclusion (include_path='.') in /home/psanchez/tests/hola.php on line 8 I need to know what the problem is because I have a software that should work but it doesn't. Any ideas? Thanks Pablo S. Torralba


« previous php.general (#168079) next »