$ftp_server = 'ftp.abc.com';
$remote_file = "myvideo.avi"; // file size 210MB
$file = "myvideo.avi"; // file size 210MB
$conn_id = ftp_connect($ftp_server); // set up basic connection
// login with username and password
$login_result = ftp_login($conn_id, 'faraz@abc.com', 'password');
ftp_pasv($conn_id, true); // turn passive mode on
// upload a file
if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) {
echo "successfully uploaded $file\n";
} else {
echo "There was a problem while uploading $file\n";
}
// close the connection
ftp_close($conn_id);
i already edit php.in for
upload_max_filesize = 1024M
上面的代码对所有类型的文件的工作(S)上传,
但是,当我试图上传大尺寸文件,然后上传在服务器上,但尺寸上传后变化。
本地机器上的视频文件大小210MB
但上传完毕后,显示FTP服务器上的文件大小328KB。
我不知道我在哪里可以检查,如果有人有意见的话,我赞赏