ftp_rename
Rename a file or directory on the FTP server.
ftp_rename()
function changes the file or directory name on the FTP server.
Return true if successful, otherwise return false.
<?php $conn = ftp_connect("ftp.testftp.com") or die("Could not connect"); ftp_login($conn,"admin","ert456"); ftp_rename($conn,"oldname.txt","newname.txt"); ftp_close($conn); ?>
ftp_rename ( ftp_connection , from , to )
parameter | describe |
---|---|
ftp_connection | Required. Specifies the FTP connection to be used (the identifier of the FTP connection). |
from | Required. Specifies the file or directory to be renamed. |
to | Required. Specify the new name of the file or directory. |