note 125894 deleted from function.mkdir by crell
| From: | crell@php.net | Date: | Wed, 29 Jun 2022 19:16:28 +0000 |
| Subject: | note 125894 deleted from function.mkdir by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218708@lists.php.net to get a copy of this message | ||
Note Submitter: mamedul.github.io
----
To create nested folder In windows OS use suppressor @.
This suppressor will handle user type errors also.
$path = 'testpath\nested1\nested2\nested3\';
@mkdir( $path, '0777', TRUE);
Besides you can create a function-
function createMyDir( $path ){
return @mkdir( $path, '0777', TRUE);
}