#30881 [Opn->Bgs]: C++ like include (path/search) in PHP?
| From: | tony2001@php.net | Date: | Fri, 26 Nov 2004 09:53:52 +0000 |
| Subject: | #30881 [Opn->Bgs]: C++ like include (path/search) in PHP? | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969365240@lists.php.net to get a copy of this message | ||
ID: 30881
Updated by: tony2001@php.net
Reported By: ovdspek at liacs dot nl
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: Debian Linux Sarge
PHP Version: 4.3.9
New Comment:
>In that case, please update your documentation so it
>doesn't say it'll search relative to the directory of
>current script.
All SAPIs except CLI DO search relative to the directory of current
running script.
But you're using CLI and this feature is documented too.
Previous Comments:
------------------------------------------------------------------------
[2004-11-26 10:12:22] ovdspek at liacs dot nl
In that case, please update your documentation so it doesn't say it'll
search relative to the directory of current script.
------------------------------------------------------------------------
[2004-11-26 09:42:24] derick@php.net
That doesn't matter. It will NOT change and NOT added. Please stop
reopening this bug.
------------------------------------------------------------------------
[2004-11-26 09:29:15] ovdspek at liacs dot nl
> All other SAPIs will chdir to the scripts directory. CLI will not.
Isn't that what Tony said too?
------------------------------------------------------------------------
[2004-11-26 01:33:42] edink@php.net
All other SAPIs will chdir to the scripts directory. CLI will not. This
is not a bug, so please don't reopen this report.
You can always use:
include dirname(__FILE__).'/../1.php';
to solve your problem with relative paths in includes.
------------------------------------------------------------------------
[2004-11-25 23:59:46] ovdspek at liacs dot nl
I'm not asking for PHP (CLI) to change the cwd to that of the script.
I'm only asking for PHP to look for files *relative to the directory of
the current script*, as the documentation claims it does.
Note that the directory of the current script is *not* equivalent to
the cwd (current working directory).
> Files for including are first looked in include_path relative to the
current working directory and then in include_path relative to the
directory of current script.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/30881
--
Edit this bug report at http://bugs.php.net/?id=30881&edit=1