[email protected] Posted February 11, 2010 Share Posted February 11, 2010 Hello I need to transfer a file from my ftp server to remote ftp server. Here is my code, but it gives error as, Warning: ftp_put() [function.ftp-put]: Can't open that file: No such file or directory <?php ob_start(); if(!file_exists('storage/glive.sql')) echo "File not found"; //ftp details of sedtination server $ftp_server="222.22.22.222"; $ftp_user="ferghco"; $ftp_password="*********"; $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user, $ftp_password); if((!$conn_id) || (!$login_result)) { echo "FTP connection has failed!"; echo "Attempted to connect to $ftp_server for user $ftp_user"; exit(); } $upload = ftp_put($conn_id,'/test/glive1.sql', 'storage/glive.sql', FTP_BINARY); if (!$upload) { echo 'FTP upload failed!'; } ob_end_flush(); ?> Can anybody give the solution?????? Link to comment https://forums.phpfreaks.com/topic/191738-transferring-file-between-ftps/ Share on other sites More sharing options...
[email protected] Posted February 11, 2010 Author Share Posted February 11, 2010 Its working.. got solution. Link to comment https://forums.phpfreaks.com/topic/191738-transferring-file-between-ftps/#findComment-1010612 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.