#29274 [Opn->Fbk]: mkdir() failed to create dir
| From: | tony2001@php.net | Date: | Mon, 14 Feb 2005 23:57:21 +0000 |
| Subject: | #29274 [Opn->Fbk]: mkdir() failed to create dir | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-74077@lists.php.net to get a copy of this message | ||
ID: 29274
Updated by: tony2001@php.net
Reported By: ca50015 at yahoo dot com
-Status: Open
+Status: Feedback
-Bug Type: Directory function related
+Bug Type: Filesystem function related
Operating System: windows 98 se
PHP Version: 5.0.0
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.0-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2004-07-20 10:59:57] ca50015 at yahoo dot com
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')
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29274&edit=1