note 6825 modified in fread by ronabop
| From: | ronabop@php.net | Date: | Mon, 02 Oct 2000 10:53:43 +0000 |
| Subject: | note 6825 modified in fread by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-5902@lists.php.net to get a copy of this message | ||
try this:
<?
$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
http://www.php.net/manual/function.fread.php