Current Location: Home> Function Categories> mkdir

mkdir

Create a new directory
Name:mkdir
Category:File system
Programming Language:php
One-line Description:Create a directory.

Definition and usage

mkdir() function creates a directory.

Return true if successful, otherwise return false.

Example

 <?php
mkdir ( "testing" ) ;
?>

grammar

 mkdir ( path , mode , recursive , context )
parameter describe
path Required. Specifies the name of the directory to be created.
mode Required. Specify authority. The default is 0777.
Recursive Required. Specifies whether to set recursive mode.
context Required. Specifies the environment for file handles. Context is a set of options that can modify the behavior of a stream.

illustrate

mkdir() attempts to create a new directory specified by path .

The default mode is 0777, which means the maximum possible access.

Similar Functions
Popular Articles