note 18394 deleted from function.fread by irc-html
| From: | irc-html@php.net | Date: | Mon, 21 Jan 2002 16:32:15 +0000 |
| Subject: | note 18394 deleted from function.fread by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25625@lists.php.net to get a copy of this message | ||
<?
$fp = fopen("file.x","r");
$buff = fread($fp,1000000);
Header("Content-Type: application/x-octet-stream");
// you can put the header file-length here but I never use it!
Header( "Content-Disposition: attachment;
filename=evaluation.fdf");
echo $buff;
?>
this will trigger a download action.
joe
-----------------
Note from Dooshek:
Remember to not put any char (especially enter) after ?>. Otherwise it will be added to
downloaded file and it could be damaged.