Returning image.... (header format)
am 26.12.2007 01:45:41 von jodlerenHi
I want to read an image an return it to the user - the point is, that
it can be any graphic image, so I need to set it properly.
AFAIK there are imaga/jpeg, image/png - then? image/gif and image/
svg ?
codesnip:
$ext=ExtractFileExt($somefile);
if($ext=="jpg")
$ext="jpeg";
header("Content-type: image/$ext");
readfile($somefile);
As of now, testing with a gif, it works... changing it to jpeg and it
still works with gif :-)
Comments? Thoughts?