Reply to Returning image.... (header format)

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация