note 25939 deleted from function.getcwd by sniper
| From: | sniper@php.net | Date: | Tue, 04 Nov 2003 00:19:01 +0000 |
| Subject: | note 25939 deleted from function.getcwd by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-59742@lists.php.net to get a copy of this message | ||
Note Submitter: lordi@msdi.ca.no.spam.net
----
Hmmm there is an issue I just found...
Let say you have a structure like this (win32)
d:\inetpub\www.domain.com\subdir\testfile.php
The user foo has access to /subdir only...
The user foo2 has access to all the drive
The testfile.php contains only:
<? php
$curdir = getcwd();
echo $curdir;
?>
The output for user foo wich doesnt have access to the full file root will be
"c:\winnt" So if like me you wanted to include a file based on the curdir value, you will
have some problems ;)
The output for user foo2 will be correct
ie: d:\inetpub\www.domain.com\subdir
You can bypass this problem using
print(dirname(__FILE__)); instead wich will work for both users