Download stopped in the middle
Posted: Fri Mar 12, 2004 7:06 pm
Hi everyone,
This is the script I wrote to download files form the server:
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-type: application/x-download");
header("Content-Disposition: attachment; filename=".basename($file).";" );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($file));
readfile("$file");
exit();
For some reasons, the file transfer will stop after 4mins and 54secs ~ 59secs, so any bigger files that need more that this time to download cannot be completed.
I am not sure if it's a server setting problem or a coding problem. I am using windowsXP, IIS 5.1 and PHP 5
Thank you very much.
Eric
This is the script I wrote to download files form the server:
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-type: application/x-download");
header("Content-Disposition: attachment; filename=".basename($file).";" );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($file));
readfile("$file");
exit();
For some reasons, the file transfer will stop after 4mins and 54secs ~ 59secs, so any bigger files that need more that this time to download cannot be completed.
I am not sure if it's a server setting problem or a coding problem. I am using windowsXP, IIS 5.1 and PHP 5
Thank you very much.
Eric