Example analysis of mkdir function usage in PHP, mkdir instance Analysis
This paper analyzes the usage of mkdir function in PHP. Share to everyone for your reference. The specific analysis is as follows:
mkdir () Syntax: bool mkdir (string directory, annotation permissions) dirthe New directory.permissionsoctal number Specifies the permissions of a new directory for the new directory.creates.
mkdir () Creates a directory with the specified permissions, which is the same as the file mode () and fileperms (), and returns False if an error occurs.
The PHP sample code is as follows:
Copy the Code code as follows: <?php
if (mkdir ("temp", 0701))
Print "Directory creation succeeded";
?>
Output: Directory Creation succeeded
Create a directory that has full permissions
Description: mkdir () attempted to create a new directory specified by path.
The default mode is 0777, which means the maximum possible access rights.
Hints and Notes
Note: mode is ignored under Windows, since PHP 4.2.0 as an option, the support for the context is PHP 5.0.0 added, the recursive parameter is PHP 5.0.0 added, the instance code is as follows:
Copy the Code code as follows: <?php mkdir ("testing");? >
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/912288.html www.bkjia.com true http://www.bkjia.com/PHPjc/912288.html techarticle The example analysis of mkdir function usage in PHP, mkdir example analysis the mkdir function usage in PHP in this paper. Share to everyone for your reference. The specific analysis is as follows: mkdir () syntax: bool MKD ...