note 18093 deleted from function.fpassthru by vincent
| From: | vincent@php.net | Date: | Sat, 16 Aug 2003 21:18:59 +0000 |
| Subject: | note 18093 deleted from function.fpassthru by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-54482@lists.php.net to get a copy of this message | ||
Note Submitter: westbx@volny.cz
----
How to control a displaying JPEG files (send binary files to STDOUT)?
<?PHP
$filename=$file; // string constant contain complete path to img file
$fp=fopen($filename, "rb");
header( "Content-type: image/jpeg\nContent-Disposition: inline;
filename=\"mypic.jpg\"\nContent-length: ".(string)(filesize($filename)) );
fpassthru($fp);
?>