For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > November 2004 > #30881 [Opn->Bgs]: C++ like include (path/search) in PHP?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #30881 [Opn->Bgs]: C++ like include (path/search) in PHP?
vrana@php.net

2004-11-26, 9:01 am

ID: 30881
Updated by: vrana@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:

"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." in include() page. Current working
directory can be something different than directory of a script.


Previous Comments:
------------------------------------------------------------------------

[2004-11-26 11:10:37] ovdspek at liacs dot nl

So exactly where is that documented?
At http://php.net/include/ I see no exceptions for CLI and at
http://php.net/manual/en/features.commandline.php I see no exceptions
for include.

It does say "It does not change the working directory to that of the
script. (-C and --no-chdir switches kept for compatibility)", but
that's not relevant, as the include docs say it searches the directory
of the current script, not the current working directory.
If your implementation relies on the current working directory being
the directory of the current script, then your implementation (of this
docs/specs) is wrong.

------------------------------------------------------------------------

[2004-11-26 10:53:51] tony2001@php.net

>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.

------------------------------------------------------------------------

[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?

------------------------------------------------------------------------

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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com