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
  • Write to files (safely used in binary files) fwrite

    fwrite

    Writetofiles(safelyu
  • Get file type filetype

    filetype

    Getfiletype
  • Close an open file pointer fclose

    fclose

    Closeanopenfilepoint
  • Modify the owner of the symbolic link lchown

    lchown

    Modifytheownerofthes
  • Find file paths that match patterns glob

    glob

    Findfilepathsthatmat
  • Close process file pointer pclose

    pclose

    Closeprocessfilepoin
  • Change file mode chmod

    chmod

    Changefilemode
  • Get the inode of the file fileinode

    fileinode

    Gettheinodeofthefile
Popular Articles