NYCPHP Meetup

NYPHP.org

[nycphp-talk] Checking 'mime type' of local file

David Krings ramons at gmx.net
Thu May 10 20:35:59 EDT 2007


Hi!

When one gets a file via upload information about the file is in $_FILE 
and with that also the MIME type (although one cannot rely on that).

Is there anything like this that works on local files as well? In 
particular, I want to figure out if a file is really an image file and 
not just some junk file that happens to have a .jpg, .tif, etc file 
extension.
I thought about going by the exif header, but some image files don't 
have that, but are still valid, web supported image files.

Am I pushing my luck here?

David



More information about the talk mailing list