Downloading file
| From: | Martin | Date: | Thu, 26 Oct 2000 13:19:23 +0000 |
| Subject: | Downloading file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-22128@lists.php.net to get a copy of this message | ||
Hello !
I have a binary-file on my server, which is 17236097 bytes long. You can
download this file with the following script:
Header( "Content-type: $this->mime");
Header( "Content-Disposition: attachment; filename=$filename" );
Header( "Content-Description: My Generated Data" );
$fp = fopen($filename, "r");
while (!feof ($fp))
{ $buffer = fgetc($fp);
print $buffer;
}
fclose($fp);
The downloaded file then on my harddisc is 16723744 bytes long. Any
ideas why some bytes are missing ?
Martin