note 25838 added to function.include
| From: | gui at rack1 dot php dot net | Date: | Tue, 08 Oct 2002 14:28:29 +0000 |
| Subject: | note 25838 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-37789@lists.php.net to get a copy of this message | ||
Check this weird behaviour
Imagine I have something like this
(root)/db/db.h.php ,
(root)/db/admin/admin.h.php (which includes ../db.h.php)
and finally
(root)/db/admin/users/index.php (which includes ../admin.h.php)
When you run /db/admin/users/index.php, it returns a Warning: Failed opening '../db.h.php'
for inclusion.
So, it seems include() will always use the path of the page that's actually (in this case
index.php) running, not the path of the file that includes it.
--
http://www.php.net/manual/en/function.include.php
http://master.php.net/manage/user-notes.php?action=edit+25838
http://master.php.net/manage/user-notes.php?action=delete+25838
http://master.php.net/manage/user-notes.php?action=reject+25838