Example analysis of mkdir function usage in php and mkdir instance analysis. Example of mkdir function usage in php, and mkdir instance Analysis This article analyzes the usage of mkdir function in php. Share it with you for your reference. The specific analysis is as follows: mkdir () syntax: mkdir function usage instance analysis in boolmkd php, mkdir instance analysis
This article analyzes the usage of mkdir function in php. Share it with you for your reference. The specific analysis is as follows:
Mkdir () syntax: bool mkdir (string directory, interpreted permission) dirThe new directory. permissionsOctal number specifies the permission for a new directory named directory. Creates.
Mkdir () creates a directory with the specified permission. The permission is in the same format as the file mode () and fileperms (). If an error occurs, FALSE is returned.
The php sample code is as follows:
The code is as follows:
<? Php
If (mkdir ("temp", 0701 ))
Print "directory created ";
?>
// Output: the directory is successfully created.
Create a directory with full permissions
Note: mkdir () tries to create a directory specified by path.
The default mode is 0777, which means the maximum possible access.
Tips and comments
Note: mode is ignored in Windows. it is optional since PHP 4.2.0. the support for context is added by PHP 5.0.0, and the recursive parameter is added by PHP 5.0.0. the instance code is as follows:
The code is as follows:
<? Php mkdir ("testing");?>
I hope this article will help you with PHP programming.
Examples in this article analyze the usage of mkdir function in php. Share it with you for your reference. The specific analysis is as follows: mkdir () syntax: bool mkd...