[EMAIL PROTECTED] ls -l /usr/local/cms
-rw-r--r-- 1 user users 20 Jan 16 02:17 index.php
drwxr-xr-x 9 user users 4096 Feb 22 16:40 admin
[EMAIL PROTECTED] ls -l /vhost/test01.com/var/www/html/
-rw-r--r-- 1 user users 20 Jan 16 02:17 config.php
lrwxrwxrwx 1 root root 31 Feb 22 14:05 index.php -> /usr/local/cms/index.php
lrwxrwxrwx 1 root root 31 Feb 22 14:05 admin -> /usr/local/cms/admin
[EMAIL PROTECTED] cd /vhost/test01.com/var/www/html/admin/
[EMAIL PROTECTED] pwd
/vhost/test01.com/var/www/html/admin
[EMAIL PROTECTED][admin]#
Bash is doing what I need. It sees the current directory as the full path of the symlink.
The admin.php at this point only has system("pwd"); in it and it prints out /usr/local/cms/admin as the directory it is in, not what I want. It will never see the ../config.php file.
I tried doing this
chdir ($_SERVER[DOCUMENT_ROOT]."/".$_SERVER[REQUEST_URI]);
but it still resolves the link and does not accept the path that I constructed.
How can I make PHP use the symlink and stop trying to resolve the original files?
|
signature.asc
Description: This is a digitally signed message part