#33140 [Opn]: Recursive 'mkdir' doesn't work when path includes a non-existent root folder

From: Date: Wed, 25 May 2005 17:54:33 +0000
Subject: #33140 [Opn]: Recursive 'mkdir' doesn't work when path includes a non-existent root folder
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79497@lists.php.net to get a copy of this message
ID: 33140 User updated by: cbelin at free dot fr Reported By: cbelin at free dot fr Status: Open Bug Type: Directory function related Operating System: Windows XP PHP Version: 5.0.4 New Comment: Note : this bug doesn't appear when you specify a drive letter. <?php mkdir('C:\toto\tata\titi', 0777, true); ?> Previous Comments: ------------------------------------------------------------------------ [2005-05-25 18:02:41] cbelin at free dot fr Description: ------------ Recursive 'mkdir' (with PHP 5.0.4 and Windows) doesn't function correctly when the path includes a non-existent root folder. Reproduce code: --------------- <?php mkdir('\toto\tata\titi', 0777, true); ?> Expected result: ---------------- The following structure of directories should have been created : \toto\tata\titi Actual result: -------------- No directory being created ! The function 'mkdir' fails if directory '\toto' doesn't already exists. Instead, it outputs : Warning: mkdir() [function.mkdir]: No such file or directory in xxx.php on line xxx So I must use this code : <?php mkdir('\toto'); mkdir('\toto\tata\titi', 0777, true); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33140&edit=1

« previous php.bugs (#79497) next »