#46801 [Com]: include() searches wrong directory according to the doc
ID: 46801
Comment by: tomas at matfyz dot cz
Reported By: tomas at matfyz dot cz
Status: Open
Bug Type: *General Issues
Operating System: Linux
PHP Version: 5.2.7
New Comment:
I can't help it, the link is being wrapped by this website, you must
re-construct it.
Previous Comments:
------------------------------------------------------------------------
[2008-12-08 19:56:12] tomas at matfyz dot cz
Sorry, the correct link is
http://artax.karlin.mff.cuni.cz/~ttel5535/obs/pok_require_dirs3/report/www/use.php
------------------------------------------------------------------------
[2008-12-08 19:50:54] tomas at matfyz dot cz
Description:
------------
In the documentation (http://cz.php.net/manual/en/function.include.php)
is the following statement:
"... E.g. if your include_path is libraries, current working directory
is /www/, you included include/a.php and there is include "b.php" in
that file, b.php is first looked in /www/libraries/ and then in
/www/include/. ..."
This is not true. There is either a bug in the documentation or in the
PHP.
Tested on 5.2.0-8+etch11.
Reproduce code:
---------------
Please see
http://artax.karlin.mff.cuni.cz/~ttel5535/obs/pok_require_dirs3/report/www/use.php
. The source code is in multiple directories, you can download it from
there.
Expected result:
----------------
www/include/a.php: fun_a()
www/include/b.php: fun_b()
Actual result:
--------------
www/include/a.php: fun_a()
www/b.php: fun_b()
According to the documentation, the file www/include/b.php should be
included!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46801&edit=1
Thread (10 messages)