Skip to content
Snippets Groups Projects
Commit 615a21ed authored by Brian Cowan's avatar Brian Cowan
Browse files

use fread instead of fpassthru in fetch.php

darcs-hash:20050728184238-93e20-0c838d887fb148de48dd01b34afdf3f150e94765.gz
parent 1bf7859f
No related branches found
No related tags found
No related merge requests found
......@@ -85,7 +85,12 @@
$fp = @fopen($FILE,"rb");
if($fp){
fpassthru($fp); //does a close itself
while (!feof($fp)) {
@set_time_limit(); // large files can take a lot of time
print fread($fp, 16*1024);
flush();
}
fclose($fp);
}else{
header("HTTP/1.0 500 Internal Server Error");
print "Could not read $FILE - bad permissions?";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment