note 96990 added to function.mkdir

From: Date: Fri, 26 Mar 2010 11:26:52 +0000
Subject: note 96990 added to function.mkdir
Groups: php.notes 
Request: Send a blank email to php-notes+get-167429@lists.php.net to get a copy of this message
When using the recursive parameter bear in mind that if you're using chmod() after mkdir() to set the mode without it being modified by the value of uchar() you need to call chmod() on all created directories. ie: <?php mkdir('/test1/test2', 0777, true); chmod('/test1/test2', 0777); ?> May result in "/test1/test2" having a mode of 0777 but "/test1" still having a mode of 0755 from the mkdir() call. You'd need to do: <?php mkdir('/test1/test2', 0777, true); chmod('/test1', 0777); chmod('/test1/test2', 0777); ?> ---- Server IP: 92.48.74.199 Probable Submitter: 92.27.124.179 ---- Manual Page -- http://www.php.net/manual/en/function.mkdir.php Edit -- https://master.php.net/note/edit/96990 Del: integrated -- https://master.php.net/note/delete/96990/integrated Del: useless -- https://master.php.net/note/delete/96990/useless Del: bad code -- https://master.php.net/note/delete/96990/bad+code Del: spam -- https://master.php.net/note/delete/96990/spam Del: non-english -- https://master.php.net/note/delete/96990/non-english Del: in docs -- https://master.php.net/note/delete/96990/in+docs Del: other reasons-- https://master.php.net/note/delete/96990 Reject -- https://master.php.net/note/reject/96990 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167429) next »