note 18093 modified in function.fpassthru by spic

From: Date: Fri, 30 Aug 2002 22:03:48 +0000
Subject: note 18093 modified in function.fpassthru by spic
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-36067@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); ?> --was-- 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

« previous php.notes (#36067) next »