The ftp_rename() function renames a file or directory on the FTP server.
bool ftp_rename ( resource $ftp_stream , string $oldname , string $newname )
ftp_rename() renames a file or a directory on the FTP server.
Parameter | Description |
---|---|
ftp_stream | The link identifier of the FTP connection |
oldname | The old file/directory name |
newname | The new name |
Returns TRUE on success or FALSE on failure. Upon failure (such as attempting to rename a non-existent file), an E_WARNING error will be emitted.