note 96973 added to function.mkdir

From: Date: Thu, 25 Mar 2010 15:22:30 +0000
Subject: note 96973 added to function.mkdir
Groups: php.notes 
Request: Send a blank email to php-notes+get-167388@lists.php.net to get a copy of this message
When using the recursive parameter only the last directory is given the mode you specify. ie: <?php mkdir('/test1/test2/test3', 0777, true); ?> May result in something like this: test1 - 0755 (or whatever the default umask may be) test2 - 0755 (or whatever the default umask may be) test3 - 0777 This might be obvious to some, but it tripped me up when I was expecting 0777 on all created directories in the path. ---- Server IP: 69.147.83.197 Probable Submitter: 92.27.124.179 ---- Manual Page -- http://www.php.net/manual/en/function.mkdir.php Edit -- https://master.php.net/note/edit/96973 Del: integrated -- https://master.php.net/note/delete/96973/integrated Del: useless -- https://master.php.net/note/delete/96973/useless Del: bad code -- https://master.php.net/note/delete/96973/bad+code Del: spam -- https://master.php.net/note/delete/96973/spam Del: non-english -- https://master.php.net/note/delete/96973/non-english Del: in docs -- https://master.php.net/note/delete/96973/in+docs Del: other reasons-- https://master.php.net/note/delete/96973 Reject -- https://master.php.net/note/reject/96973 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167388) next »