WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

PHP ftp_mkdir () function


Definition and usage

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

If successful, the function returns the name and path of the new directory. If it fails, it returns FALSE.

Syntax

ftp_mkdir (ftp_connection, dir)

parameters description
ftp_connection Required. Specifies the FTP connection to use.
dir Required. Specifies the name of the directory to be created.


Example

<?php
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");

echo ftp_mkdir($conn,"testdir");

ftp_close($conn);
?>

The above code will output:

/testdir