Faqts : Computers : Programming : Shopping For You : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

19 of 26 people (73%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

Is it possible to make PHP output a gif/png (eg a photo) as well as the desired data output?

Nov 27th, 2008 02:52
healthy man, dman, Henrik Hansen, Norton Seron, http://www.ttnr.org


Yes it is possible, a little example below:
$file = "picture.gif";
//if you are on windows use rb
$fp = fopen($file, "r");
$content = fread($fp, filesize($file));
header("Content-type: image/gif");
echo $content;
read more at:
http://www.php.net/manual/en/function.fread.php
http://www.healthbyhealth.com
http://www.healthment.com
http://www.mesotheliomadown.com
http://www.mesotheliomaout.com
http://www.pickarticle.com