note 18092 added to function.fflush
| From: | westbx at volny dot cz | Date: | Thu, 10 Jan 2002 09:38:16 +0000 |
| Subject: | note 18092 added to function.fflush | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-24615@lists.php.net to get a copy of this message | ||
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);
fflush();
?>
--
http://www.php.net/manual/en/function.fflush.php
http://master.php.net/manage/user-notes.php?action=edit+18092
http://master.php.net/manage/user-notes.php?action=delete+18092
http://master.php.net/manage/user-notes.php?action=reject+18092