Posted by Barry on 01/25/06 09:58
Hi all
I have this script(download.php) which downloads binary data from a
mysql database.
<?
/* SNIP */
$document=document::singleton();
$doc=$document->get_document($id);
if (is_object($doc)){
die;
}
header("Content-type: $doc[type]");
header("Content-length: $doc[size]");
header("Content-Disposition: attachment; filename=$doc[name]");
echo($doc['content']);
exit;
?>
This is called from another page in the
<a href="download.php?id=4">CLick here to download</a>
fashion.
The problem I am experiencing is that the download stop on 64k and then
the files are obviously corrupted.
I have checked that I do have the correct size in the db and I am giving
the correct size in the Content-length header.
Thanks
Barry
[Back to original message]
|