note 17927 added to function.dirname
| From: | ml at netuse dot de | Date: | Thu, 03 Jan 2002 15:27:07 +0000 |
| Subject: | note 17927 added to function.dirname | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-24367@lists.php.net to get a copy of this message | ||
One should note that the behaviour of dirname changed somewhere in php-4.0.3
old:
dirname("/index.html") == ""
new:
dirname("/index.html") == "/"
one can get the old behaviour for legacy
php applications with the following function:
_dirname($input) {
$ret = dirname($input);
return ("/" == $ret)?"":$ret;
}
--
http://www.php.net/manual/en/function.dirname.php
http://master.php.net/manage/user-notes.php?action=edit+17927
http://master.php.net/manage/user-notes.php?action=delete+17927
http://master.php.net/manage/user-notes.php?action=reject+17927