/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function connectToFTP($file_name,$download_to,$new_name) { $dir_path = '/NDE Test Folder/'; if ((!$conn_id) || (!$login_result)) { //echo "FTP connection has failed!"; //exit; return false; } else { //echo 'connected'; die; // get the file //ftp_rename($conn_id,"oldname.txt","newname.txt"); // close the FTP stream //return true; // check upload status if (!$result) { return false; } else { return true; } } } function renameFTPFile($old_file, $new_file) { //ftp_rename($conn_id,"oldname.txt","newname.txt"); return true; }