Home > Article > Backend Development > Getting started example of using mkdir to create multi-level directories in PHP
First introduce the mkdir() function:
mkdir($path,0777,true);
The first parameter: required, represents the path of the multi-level directory to be created;
The second parameter: set the directory The permissions, the default is 0777, which means the maximum possible access rights;
The third parameter: true means that the creation of multi-level directories is allowed.
Example code (supports creating Chinese directories):
For more introductory examples of using mkdir to create multi-level directories in PHP, please pay attention to the PHP Chinese website!