php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31653 basename return error
Submitted: 2005-01-22 07:57 UTC Modified: 2005-01-26 17:20 UTC
From: hunreal at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5CVS-2005-01-26 (dev) OS: FreeBSD 4.11
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hunreal at gmail dot com
New email:
PHP Version: OS:

 

 [2005-01-22 07:57 UTC] hunreal at gmail dot com
Description:
------------
basename() error

Reproduce code:
---------------
<?
echo basename('C:\Backup\My Documents\My Pictures\Diablotin.jpg');
?>

Expected result:
----------------
result
------------
Diablotin.jpg
------------

Actual result:
--------------
result
----------
C:\Backup\My Documents\My Pictures\Diablotin.jpg
----------
It also make the file upload function run incorrectly.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-23 07:06 UTC] hunreal at gmail dot com
The win32 build work correctly with both unix path and windows path.

But the src build in *nix is only work with basename(unix path)
 [2005-01-25 19:23 UTC] hunreal at gmail dot com
Today, I checked the latest CVS version
<?
echo basename("c:\abc\test.bak");
?>
result,
c:\abc  est.bak
 [2005-01-26 17:20 UTC] hunreal at gmail dot com
I am sorry for some mistake.
But,
<?
echo basename('c:\test\a.txt');
?>
c:\test\a.txt
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 19 17:00:02 2025 UTC