Image

Imagecparker wrote in Imagephp

MIME Types

How would one go about determining a file's MIME type with PHP?

I've seen a few solutions that all involve maintaining a discrete list somewhere and updating it--in addition to any other local MIME type lists--as needed. I'd rather use a less "clumsy" way of doing this if one exists.

EDIT: Nevermind! The function was hiding on me on php.net: mime_content_type. I realize that this has been deprecated by the PECL fileinfo extension, but it works for me for now.