I have a large file (2GB) and I want to download it to server A from server B with PHP.
我尝试过普惠制和民盟,但没有成功。 即便我确定“时间”为0值的限制,它还是回过了一次技术评估的结果。
Here s my code:
<?php
set_time_limit(0)
$local_file = file.zip ;
$server_file = /www/file.zip ;
$conn_id = ftp_connect("ftp.webmashing.com");
$login_result = ftp_login($conn_id, "USERNAME", "PASSWORD");
if (ftp_get($conn_id, $local_file, $server_file, FTP_BINARY)) {
echo "Successfully written to $local_file
";
} else {
echo "There was a problem
";
}
ftp_close($conn_id);
?>