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, returns FALSE.
ftp_mkdir(ftp_connection,dir)
parameter | describe |
---|---|
ftp_connection | Required. Specifies the FTP connection to use. |
dir | Required. Specifies the name of the directory to be created. |
<?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