#32516 [Bgs]: mkdir's recursive parameter
| From: | cbelin at free dot fr | Date: | Wed, 06 Apr 2005 08:41:44 +0000 |
| Subject: | #32516 [Bgs]: mkdir's recursive parameter | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-76430@lists.php.net to get a copy of this message | ||
ID: 32516
User updated by: cbelin at free dot fr
Reported By: cbelin at free dot fr
Status: Bogus
Bug Type: Directory function related
Operating System: Windows XP
PHP Version: 5.0.3
New Comment:
Yes ! It works with the proper use of DIRECTORY_SEPARATOR constant.
Thanks
Previous Comments:
------------------------------------------------------------------------
[2005-04-03 16:50:55] tony2001@php.net
Use appropriate slashes on Windows (i.e. DIRECTORY_SEPARATOR
constant).
I doubt this behaviour will be changed ever, because "dir\name" is
perfectly valid directory name on *nix.
------------------------------------------------------------------------
[2005-04-01 09:21:05] cbelin at free dot fr
Here is a simple example of the "bug" :
<?php
mkdir("toto/tata/titi/tutu", 0777, true);
?>
It outputs :
Warning: mkdir() [function.mkdir]: No such file or directory in
D:\Serveur Web\...\toto.php on line 2
Instead, I must use successive mkdir() calls :
<?php
mkdir("toto", 0777);
chdir("toto");
mkdir("tata", 0777);
chdir("tata");
mkdir("titi", 0777);
chdir("titi");
mkdir("tutu", 0777);
?>
------------------------------------------------------------------------
[2005-03-31 20:38:21] sniper@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.
If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2005-03-31 15:41:15] cbelin at free dot fr
Description:
------------
What is the purpose of the 'recursive' parameter of the 'mkdir'
function ?
I expected that it allow to create a directory structure recursively
but it doesn't seem to work !
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32516&edit=1