PHP ftp_mkdir() Function

The ftp_mkdir() function creates a new directory on the FTP server.

ftp_mkdir — Creates a directory.

string ftp_mkdir ( resource $ftp_stream , string $directory )

Creates the specified directory on the FTP server.

Example -

ParameterDescription
ftp_connectionRequired. Specifies the FTP connection to use
dirRequired. Specifies the name of the directory to create

Returns the newly created directory name on success or FALSE on error.