note 25838 deleted from function.include by sniper
| From: | sniper@php.net | Date: | Wed, 29 Jan 2003 04:15:12 +0000 |
| Subject: | note 25838 deleted from function.include by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-42994@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.