|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-03-15 09:08 UTC] stas@php.net
[2001-03-15 10:09 UTC] vvo at geocities dot com
[2001-07-16 12:07 UTC] zeev@php.net
[2002-03-05 00:33 UTC] vvo at geocities dot com
[2002-06-07 20:36 UTC] mfischer@php.net
[2004-01-13 09:57 UTC] php at arantius dot cjb dot net
[2004-03-18 17:51 UTC] schapht at drexel dot edu
[2004-03-24 15:14 UTC] chunan at zingy dot com
[2004-04-01 18:31 UTC] vvo at geocities dot com
[2004-04-01 18:32 UTC] vvo at geocities dot com
[2004-04-01 18:36 UTC] iliaa@php.net
[2004-04-02 16:03 UTC] chapwest at hotmail dot com
[2004-04-05 08:50 UTC] sniper@php.net
[2004-04-20 06:21 UTC] cameron at prolifique dot com
[2004-06-10 17:31 UTC] vvo at geocities dot com
[2004-07-01 16:30 UTC] php at mrvanes dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 01:00:01 2025 UTC |
Here is an example of how relative paths are currently resolved with cascading inclusions (command line is 'php /home/joe/a.php'): File '/home/joe/a.php': <?php # this include works as expected, # locating '/home/joe/include/b.inc' include_once( 'include/b.inc' ); ?> File '/home/joe/include/b.inc': <?php # this include will assume '/home/joe/c.inc', but # not '/home/joe/include/c.inc', as one may expect =( include_once( 'c.inc' ); ?> File '/home/joe/include/c.inc': <?php echo 'hello'; ?> The way all four functions [require(), require_once(), include(), include_once()] resolve relative paths is counter-intuitive and unproductive with large directory structures, because some trickery is required to fix this problem. Not to mention that it hurts to see a different behavior from C-preprocessor #include directives. If you don't believe me, then see comments to the include() function...