Home  >  Article  >  Backend Development  >  Getting started example of using mkdir to create multi-level directories in PHP

Getting started example of using mkdir to create multi-level directories in PHP

高洛峰
高洛峰Original
2016-12-21 15:25:071183browse

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!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn