| 
 Posted by jodleren on 12/26/07 00:45 
Hi 
 
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?
 
[Back to original message] 
 |