note 14028 added to function.mkdir.php
| From: | tac at smokescreen dot org | Date: | Fri, 13 Jul 2001 21:24:28 +0000 |
| Subject: | note 14028 added to function.mkdir.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15356@lists.php.net to get a copy of this message | ||
To check if the directory exists before calling mkdir(), use files_exists, e.g.
if (!file_exists($path)) {
mkdir($path, 0777);
}
$dir = dir($path);
http://www.php.net/manual/en/function.mkdir.php