|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-02-15 00:57 UTC] tony2001@php.net
[2005-02-22 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 05:00:01 2025 UTC |
Description: ------------ mkdir() wont work properly when its parameter is a numeric string Reproduce code: --------------- <?php $path = array('1/0/0001', '1/1/0001'); $cwd = getcwd(); foreach ($path as $p) { $p = explode('/', $p); foreach ($p as $dir_name) { if (! is_dir("./$dir_name")) { mkdir("./$dir_name"); } chdir("./$dir_name"); } chdir($cwd); } ?> Expected result: ---------------- It should create two directory trees under current dir: 1/0/0001 1/1/0001 Actual result: -------------- and the result is: 1/0/0001 (correct) 1/0001 (should be '1/1/0001')