note 46681 added to function.realpath
| From: | steudel at attenstion dot de | Date: | Wed, 20 Oct 2004 05:38:00 +0000 |
| Subject: | note 46681 added to function.realpath | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-78804@lists.php.net to get a copy of this message | ||
I just mentioned a quite confusing aspect of realpath(). Suppose a path
'/my/existing/path' that really exists and a path
'/my/existing/path/nonexistentsubdir' that doesn't. A call to
<?php
realpath('/my/existing/path/nonexistentsubdir/..');
?>
will fail because it contains a non-existent path.
watch out! ;-)
----
Manual Page -- http://www.php.net/manual/en/function.realpath.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46681
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46681&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46681&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46681&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46681&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46681&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46681&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46681&report=yes
Search -- http://master.php.net/manage/user-notes.php