note 114960 deleted from function.mkdir by crell
| From: | crell@php.net | Date: | Wed, 29 Jun 2022 19:15:25 +0000 |
| Subject: | note 114960 deleted from function.mkdir by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218704@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
Don't forget to use the recursive option on Windows if creating a folder below a folder that
already exists. Otherwise you may get a very confusing error message, "Warning: mkdir(): No
such file or directory in d:\path\to\file" where you think the folder should exist but you
forgot to create the parent(s).
For example, if d:\path exists but there is nothing in it:
<?php
$path = 'd:\path\to\my\file';
mkdir($path, null, true);
?>