Doc #52845 [Asn->Csd]: Documentation wrong re includes with relative paths
| From: | aharvey@php.net | Date: | Wed, 15 Sep 2010 03:55:32 +0000 |
| Subject: | Doc #52845 [Asn->Csd]: Documentation wrong re includes with relative paths | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-5040@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52845&edit=1
ID: 52845
Updated by: aharvey@php.net
Reported by: mail_ben_schmidt at yahoo dot com dot au
Summary: Documentation wrong re includes with relative paths
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Assigned To: aharvey
Block user comment: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2010-09-15 05:55:28] aharvey@php.net
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=303377
Log: Fix doc bug #52845 (Documentation wrong re includes with relative
paths) by
adding clarifying text on what we actually mean by full and relative
paths.
------------------------------------------------------------------------
[2010-09-15 03:17:04] mail_ben_schmidt at yahoo dot com dot au
Having now done a bit of testing, it seems the main problem is the term
'relative path'. What is actually meant is 'a path beginning with a
dot'. If the path is absolute, or begins with a dot, the include path is
not used. But relative paths such as 'subdir/file.php' still go through
the include_path mechanism.
------------------------------------------------------------------------
[2010-09-15 02:09:27] mail_ben_schmidt at yahoo dot com dot au
Description:
------------
The documentation about how relative includes work must be wrong. It
states that the include path is not checked when any kind of path
(relative or absolute) is given.
Note also the deficiency noted in bug #51569, also related to poor
documentation of how the include path/include statement works.
Test script:
---------------
include('PHPUnit/Framework.php');
Expected result:
----------------
According to the documentation, I expect a warning about non-existent
file PHPUnit/Framework.php, as this doesn't exist relative to the cwd or
the directory of the script, but somewhere inside PEAR's repository
(referenced in the include path).
Actual result:
--------------
The file is successfully found and included.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52845&edit=1