Bug #51685 [Opn->Bgs]: dirname() returns part of query string parsing a URL containing a slash
| From: | pajoye@php.net | Date: | Wed, 28 Apr 2010 17:44:12 +0000 |
| Subject: | Bug #51685 [Opn->Bgs]: dirname() returns part of query string parsing a URL containing a slash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150005@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51685&edit=1
ID: 51685
Updated by: pajoye@php.net
Reported by: shepard dot dl at gmail dot com
Summary: dirname() returns part of query string parsing a URL
containing a slash
-Status: Open
+Status: Bogus
Type: Bug
Package: Directory function related
Operating System: Linux
PHP Version: 5.3.2
New Comment:
Use parse_url if you like to parse URL.
Previous Comments:
------------------------------------------------------------------------
[2010-04-28 19:42:33] shepard dot dl at gmail dot com
I made a mistake in the description. It should read: "If a url with a
query string
that contains a slash (/) is passed to dirname(), dirname() returns
everything up
to the slash in the query string."
------------------------------------------------------------------------
[2010-04-28 19:37:28] shepard dot dl at gmail dot com
Description:
------------
If a url that contains a slash (/) is passed to dirname(), dirname()
returns
everything up to the slash in the query string.
Test script:
---------------
$dirname = "web/index.php?url=pages/test.php";
print dirname($dirname);
Expected result:
----------------
application/pages
Actual result:
--------------
application/pages/index.php?url=pages
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51685&edit=1