Hi
let's say we have the follwing directory structure:
directory test, with to subdirectories: a and b; both have ssi
subdirectory; a has also a subdirectory c with an index.php file in it
and in b we habe a symbolic link to a/c.
On the shell it looks like this:
,----
| /htdocs/test>ls -gG *
| a:
| total 8
| drwxr-xr-x 2 4096 Jan 4 20:55 c
| drwxr-xr-x 2 4096 Jan 4 20:51 ssi
|
| b:
| total 4
| lrwxrwxrwx 1 6 Jan 4 20:53 c -> ../a/c
| drwxr-xr-x 2 4096 Jan 4 20:53 ssi
| ~/htdocs/test>cat a/ssi/a.inc
| In directory a
|
| ~/htdocs/test>cat b/ssi/a.inc
| In directory b
`----
As you see whe have an a.inc in each ssi. If we call now the index.php
which does nothing more than to:
include('../ssi/a.inc')
what would you expect to read if you called b/c/index.php? I expected to
read 'In directory b' but I read 'In directory a'.
,----
| ~/htdocs/test>(cd a/c && php -f index.php )
| In directory a
|
|
| ~/htdocs/test>(cd b/c && php -f index.php )
| In directory a
`----
In my opinion include() should respect symlinks to directories and not
dereference them before finding the file to include. Or am I wrong here?
The PHP version is 5.1.6 (will soon be updated).
KP
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php