MIME Type
You can retrieve various information related to the MIME type.
The main features of the MIME Type API include:
- Getting the MIME type
To get a MIME type for a file extension, use the mime_type_get_mime_type() function. The MIME type is 'application/octet-stream', if the given file extension is not associated with any specific file format.
- Getting associated extensions
To get a list of extensions associated, for example, with an image or a JPEG MIME type, use the mime_type_get_file_extension() function.