#23337 [Opn]: dirname() returns incorrect value.

From: Date: Fri, 25 Apr 2003 22:01:09 +0000
Subject: #23337 [Opn]: dirname() returns incorrect value.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38417@lists.php.net to get a copy of this message
 ID:               23337
 Updated by:       sniper@php.net
 Reported By:      cyborg at driverheaven dot net
 Status:           Open
-Bug Type:         Filesystem function related
+Bug Type:         *General Issues
 Operating System: Windows 2000/XP/2003
 PHP Version:      5CVS-2003-04-24 (dev)
 New Comment:

What's the exact PHP version in phpinfo() output?



Previous Comments:
------------------------------------------------------------------------

[2003-04-24 15:38:21] cyborg at driverheaven dot net

<?php
$string = "C:/web_home/deluxe_mail/test.php";
$dir1   = dirname($string);
$dir2   = substr($string, 0, strrpos($string, '/'));

echo $dir1; // Outputs C:/web_home/deluxe_ma
echo $dir2; // Outputs C:/web_home/deluxe_mail
?>

dirname() obviously returns the wrong result in this case, and happens
in Windows 2000 Professional, Windows 2000 Advanced Server, Windows XP
Professional, as well as Windows 2003 Enterprise Server.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=23337&edit=1



Thread (8 messages)

« previous php.bugs (#38417) next »