#41262 [Opn->Bgs]: Get wrong dirname with pathinfo under Windows
| From: | edink@php.net | Date: | Wed, 02 May 2007 20:54:02 +0000 |
| Subject: | #41262 [Opn->Bgs]: Get wrong dirname with pathinfo under Windows | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-112182@lists.php.net to get a copy of this message | ||
ID: 41262
Updated by: edink@php.net
Reported By: tim at gerundt dot de
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: Windows
PHP Version: 5.2.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2007-05-02 19:34:58] tim at gerundt dot de
Description:
------------
If I try to get the "dirname" from the pathinfo() function under
Windows with a path like "/index.php", I get "\" instead of "/" as
dirname value. Under Linux I get the desired value ("/").
I tested it with PHP 5.2.1 (Apache 2.2.4, Windows XP) and PHP 4.4.6
(Apache 2.0.54, Windows 2000).
Greetings,
Tim Gerundt
Reproduce code:
---------------
<?php
$pathinfo = pathinfo('/index.php');
print_r($pathinfo);
?>
Expected result:
----------------
Array
(
[dirname] => /
[basename] => index.php
[extension] => php
)
Actual result:
--------------
Array
(
[dirname] => \
[basename] => index.php
[extension] => php
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41262&edit=1