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; } Link to comment https://forums.phpfreaks.com/topic/125900-ftp_putftp_fput-file-shows-up-on-ftp-server-but-wont-open-size-0/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.