Re: Retrieving Image Location in PHP from MySQL

From: Date: Mon, 09 Mar 2009 14:27:07 +0000
Subject: Re: Retrieving Image Location in PHP from MySQL
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-289654@lists.php.net to get a copy of this message
On Sun, Mar 8, 2009 at 11:29 PM, Sashikanth Gurram <sashi34u@vt.edu> wrote: > Hi Nathan, > > Thanks a lot for the suggestion. It is working fine for an example code I > have used to test it. The code I have written after your suggestion is as > follows. > <?php > $location="C:\wamp\bin\apache\apache2.2.8\htdocs\Bldgs_lots\SQUIRES.jpg"; > header('Content-Type: image/jpeg'); > imagejpeg(imagecreatefromjpeg($location)); > ?> > The above code is yielding me a picture. Now, When I tried to use it in my > original code it is not giving me the image. Instead it is giving me this > warning *Warning*: Cannot modify header information - headers already sent > by (output started at C:\wamp\www\mysqli.php:65) in *C:\wamp\www\mysqli.php* > on line *221* read the manual on header(), http://us.php.net/header youve probly echo'd some output to the browser prior to calling header(). -nathan

« previous php.general (#289654) next »