note 31739 added to function.mkdir
| From: | spoonschlab at yahoo dot com | Date: | Fri, 02 May 2003 03:45:38 +0000 |
| Subject: | note 31739 added to function.mkdir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-47370@lists.php.net to get a copy of this message | ||
can anyone explain how this method works?
function mkdirs($path) {
if (strlen($path) == 0) {
return 0;
}
if (strlen($path) < 3) {
return 1;
}
elseif (is_dir($path)) {
return 1;
}
elseif (dirname($path) == $path) {
return 1;
}
return (mkdirs(dirname($path)) and mkdir($path));
}
--
http://www.php.net/manual/en/function.mkdir.php
http://master.php.net/manage/user-notes.php?action=edit+31739
http://master.php.net/manage/user-notes.php?action=delete+31739
http://master.php.net/manage/user-notes.php?action=reject+31739