#37749 [Opn->Bgs]: require does not function properly under certain conditions
| From: | tony2001@php.net | Date: | Thu, 08 Jun 2006 17:52:09 +0000 |
| Subject: | #37749 [Opn->Bgs]: require does not function properly under certain conditions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-98198@lists.php.net to get a copy of this message | ||
ID: 37749
Updated by: tony2001@php.net
Reported By: eroberts at gowfb dot com
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: Linux
PHP Version: 4.4.2
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Use absolute path if you don't want require() to use include_path.
Previous Comments:
------------------------------------------------------------------------
[2006-06-08 17:49:58] eroberts at gowfb dot com
Description:
------------
If you are in directory: rootdir/
and you require file: rootdir/dir/file1.php
and file1.php requires file2.php
if a file named file2.php does not exist in rootdir/, then file2 will
be rootdir/dir/file2.php,
BUT, if a file named file2.php exists in rootdir/, then file2 will be
rootdir/file2.php
Reproduce code:
---------------
#### base.php
require 'somedir/file1.php';
#### file1.php
require 'file2.php';
Expected result:
----------------
if ./file2.php exists, then file1.php will include ./file2.php
if ./file2.php does not exist and ./somedir/file2.php exists, then
file1.php will include ./somedir/file2.php
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37749&edit=1