|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-02-09 08:17 UTC] adconrad at 0c3 dot net
[2005-02-09 18:03 UTC] rbemrose at vgmusic dot com
[2005-02-16 19:40 UTC] cristiano at mmp dot it
[2015-03-23 19:28 UTC] cmb@php.net
-Status: Open
+Status: Duplicate
-Package: Feature/Change Request
+Package: *General Issues
[2015-03-23 19:28 UTC] cmb@php.net
[2015-03-23 22:24 UTC] rbemrose at vgmusic dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Jan 03 09:00:01 2026 UTC |
Description: ------------ Prior to PHP 4.3.10, paths sent as part of a file field had any directory components sent by misbehaving browsers (IE) stripped out. As of 4.3.10, this no longer happens, and breaks all PHP scripts dependant on the old behavior. As an alternative, make basename() strip Windows paths when used on UNIX systems. Reproduce code: --------------- if (get_magic_quotes_gpc()) { $filename = basename(stripslashes($_FILES['file1']['name'])); } else { $filename = basename($_FILES['file1']['name']); } Expected result: ---------------- $filename should contain filename.ext Actual result: -------------- When IE is used, $filename contains Drive:\path\filename.ext