ftp_rename()

It renames a file or a directory on the FTP server

Example

<?php

$ftpId = ftp_connect(‘ftp.phpcodez.com’);

$login = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);

ftp_rename($ftpId, $oFile, $nFile) or die(“Failed”);

ftp_quit($ftpId);

?>

Share