|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-06-07 23:24 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Package: Feature/Change Request
+Package: *General Issues
-Assigned To:
+Assigned To: cmb
[2015-06-07 23:24 UTC] cmb@php.net
[2015-06-21 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 08:00:01 2025 UTC |
Description: ------------ using server 2003 with iis6 a file_exists used on a tree of directory reports: file_exists("c:") = true file_exists("c:/new") = false file_exists("c:/new/new") = true second call is wrong. it happens with all first directories on a drive root Reproduce code: --------------- <? mkdir("d:/new",0777); mkdir("d:/new/new",0777); $dir = "d:/new/new"; $dir_parts = preg_split('!/+!', $dir, -1, PREG_SPLIT_NO_EMPTY); $new_dir = ($dir{0} == '/') ? '/' : ''; foreach ($dir_parts as $dir_part) { $new_dir .= $dir_part; if(file_exists($new_dir)) { echo "$new_dir exists\n"; } else { echo "$new_dir doesn't exists\n"; } $new_dir .= '/'; } ?> Expected result: ---------------- d: exists d:/new exists d:/new/new exists Actual result: -------------- d: exists d:/new doesn't exists d:/new/new exists