note 53075 deleted from function.mkdir by crell
| From: | crell@php.net | Date: | Wed, 29 Jun 2022 19:36:51 +0000 |
| Subject: | note 53075 deleted from function.mkdir by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218731@lists.php.net to get a copy of this message | ||
Note Submitter: roth at egotec dot com
----
The 'mkdir' function doesn't function correctly on Windows when the path
contains forward slashes. The part of the path with the forward slashes
doesn't get created.
mkdir('c:/a/b/c/d', 0775, true);
You get the error message:
Warning: mkdir() [function.mkdir]: No such file or directory
Please use backslashes under Windows or use the constant DIRECTORY_SEPARATOR.
mkdir('c:\a\b\c\d', 0775, true);
mkdir('c:'.DIRECTORY_SEPARATOR.'a'.
DIRECTORY_SEPARATOR.'b'.
DIRECTORY_SEPARATOR.'c'.
DIRECTORY_SEPARATOR.'d', 0775, true);