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
  • Give information about a file or symbol connection lstat

    lstat

    Giveinformationabout
  • Change the current umask umask

    umask

    Changethecurrentumas
  • Close process file pointer pclose

    pclose

    Closeprocessfilepoin
  • Format the line to CSV and write to the file pointer fputcsv

    fputcsv

    FormatthelinetoCSVan
  • Clear file status cache clearstatcache

    clearstatcache

    Clearfilestatuscache
  • Create a hard connection link

    link

    Createahardconnectio
  • Modify the owner of the symbolic link lchown

    lchown

    Modifytheownerofthes
  • Get information about a connection linkinfo

    linkinfo

    Getinformationabouta
Popular Articles