note 80553 added to function.mkdir
| From: | david dot NOSPAM at ajnewmedia dot NOSPAM dot co dot uk | Date: | Tue, 22 Jan 2008 05:04:18 +0000 |
| Subject: | note 80553 added to function.mkdir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-135303@lists.php.net to get a copy of this message | ||
p-garcia : since PHP 5, setting the recursive flag (which currently has no notes in the manual
entry) will allow you to create nested directories in the same way as Windows / Linux mkdir -p, so
long as the webserver has permissions to write in the root directory of the path specified
eg:
<?php
mkdir ("./newdir1/newdir2/newdir3/", 0755, true);
// Returns TRUE if you have permission to write to the current directory
// and creates nested directories with permissionsrwxr-xr-x
?>
----
Server IP: 194.145.210.3
Probable Submitter: 81.133.120.93
----
Manual Page -- http://www.php.net/manual/en/function.mkdir.php
Edit -- https://master.php.net/note/edit/80553
Del: integrated -- https://master.php.net/note/delete/80553/integrated
Del: useless -- https://master.php.net/note/delete/80553/useless
Del: bad code -- https://master.php.net/note/delete/80553/bad+code
Del: spam -- https://master.php.net/note/delete/80553/spam
Del: non-english -- https://master.php.net/note/delete/80553/non-english
Del: in docs -- https://master.php.net/note/delete/80553/in+docs
Del: other reasons-- https://master.php.net/note/delete/80553
Reject -- https://master.php.net/note/reject/80553
Search -- https://master.php.net/manage/user-notes.php