Re: Script returns an image?

From: Date: Wed, 14 Mar 2001 17:16:15 +0000
Subject: Re: Script returns an image?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-43882@lists.php.net to get a copy of this message
Thanks, I knew I didn't want to create or modify an image, so the html seemed the only way to retrieve it...I guess I didn't know I could retrieve a binary file in this manner. -- P ----- Original Message ----- From: "Christian Reiniger" <creinig@mayn.de> Subject: Re: [PHP] Script returns an image? > On Wednesday 14 March 2001 16:04, you wrote: > > I have been over that page, but did not know that it applied since I do > > not want to modify an image, simply pass it on to the requestor. > > Here;s my relevant code: > > > > <?php > > > > ...database stuff... > > > > Header("Content-type: image/jpg"); > > You tell the browser that you send an image... > > > ?> > > <img src="image.jpg" width="100" height="50" > > alt="Description"> > > and then send HTML code instead. > > do a <?php readfile ("image.jpg"); ?> instead of the <img> tag > > > -- > Christian Reiniger > LGDC Webmaster (http://sunsite.dk/lgdc/)

« previous php.general (#43882) next »