note 33314 added to function.mkdir

From: Date: Sun, 22 Jun 2003 16:38:05 +0000
Subject: note 33314 added to function.mkdir
Groups: php.notes 
Request: Send a blank email to php-notes+get-50815@lists.php.net to get a copy of this message
An easier way to do mkdirs : recursion. function mkdirs($strPath, $mode) { if (is_dir($strPath)) return true; $pStrPath = dirname($strPath); if (!mkdirs($pStrPath, $mode)) return false; return mkdir($strPath); } ---- Manual Page -- http://www.php.net/manual/en/function.mkdir.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33314 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33314&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33314&report=yes

« previous php.notes (#50815) next »