note 18093 added to function.fpassthru

From: Date: Thu, 10 Jan 2002 09:39:47 +0000
Subject: note 18093 added to function.fpassthru
Groups: php.notes 
Request: Send a blank email to php-notes+get-24616@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.fpassthru.php http://master.php.net/manage/user-notes.php?action=edit+18093 http://master.php.net/manage/user-notes.php?action=delete+18093 http://master.php.net/manage/user-notes.php?action=reject+18093

« previous php.notes (#24616) next »