ftp_mkdir
Create a new directory on the FTP server.
ftp_mkdir()
function creates a new directory on the FTP server.
<?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); ?>
输出:
/testdir
ftp_mkdir ( ftp_connection , dir )
parameter | describe |
---|---|
ftp_connection | Required. Specifies the FTP connection to be used (the identifier of the FTP connection). |
dir | Required. Specifies the name of the directory to be created. |
Create a new directory on the FTP server with the directory name named parameter dir .
If successful, return the newly created directory name, otherwise return false.