Return an image instead of HTML - PHP
by Naveenkumar[ Edit ] 2012-08-20 12:32:54
Hi,
$imageFileName='hello.gif';
header("Content-type: image/gif");
readfile($imageFileName);
?>
If you're want to use a jpg (resp. png) image, you must also change the 'image/gif' content-type into 'image/jpeg' (resp. 'image/png').