|
Posted by just.starting@gmail.com on 10/07/31 11:36
I am specifying the name to the dowload.php.
Here is the code:
function readfile_chunked($filename)
{
$chunksize = 256*1024; // how many bytes per chunk
$buffer = '';
$handle = fopen($filename, 'rb');
if ($handle === false) {
return false;
}
fseek($handle,0);
while (!feof($handle)) {
set_time_limit(0);
$buffer = fread($handle, $chunksize);
print $buffer;
sleep(1);
}
return fclose($handle);
}
When ever I call any other single page then it seems to wait for the
download stuff to complete, and eventually timed out if the download
thing takes long time.
Navigation:
[Reply to this message]
|