bigdspbandj Posted September 26, 2008 Share Posted September 26, 2008 Hey all. I am trying to copy a file from my webserver to a remote server via FTP. It's a zip file that works fine (when I download directly from the web server). The file shows up in the correct location on the remote server, but the file size is 0 and it can't be opened. I get the following error: Warning: ftp_fput() [function.ftp-fput]: Type set to I. Here is the code: function uploadFiles($ftp_info, $file_path, $file) { $zip_file = fopen($file_path.$file, 'r'); $ftp_connection = ftp_ssl_connect($ftp_info['host']); $login_result = ftp_login($ftp_connection, $ftp_info['username'], $ftp_info['password']); $ftp_pasv = ftp_pasv($ftp_connection, true); $upload = ftp_fput($ftp_connection, '/Walz/ToWalz/'.$file, $zip_file, FTP_BINARY); ftp_close($ftp_connection); fclose($zip_file); return $upload; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.