search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

Programming Dictionary

Online technical manual for service programmers
Popular searches:
Dictionary homepage Server PHP php mkdir() function
php mkdir() function Detailed instructions for use

php mkdir() function

Chinese translation Recent Updates: 2018-04-19 14:18:17

UK [mk'dɪər] US [mk'dɪr]

n.DOS command: Create a new subdirectory


php mkdir() function syntax

Function: Create a directory.

Syntax: mkdir(path,mode,recursive,context)

Parameters:

ParameterDescription
path Required. Specifies the name of the directory to be created.
mode Required. Specify permissions. The default is 0777.
recursive Required. Specifies whether to set recursive mode.
context Required. Specifies the environment for a file handle. Context is a set of options that modify the behavior of the stream.

Description: Try to create a new directory specified by path. The default mode is 0777, which means maximum possible access.

php mkdir() function example

<?php
$dir = mkdir("newFile");
if($dir)
{
    echo "目录创建成功";
}else{
    echo "目录创建失败";
}
?>
php mkdir() function