- ⌂ mime_type
- Static Methods
mime_type::get_info_from_mime_type()
Get information about a file format based on the MIME Type.
Prototype
array get_info_from_mime_type(string $mime_type)
Parameters
- mime_type - A two-part MIME Type string, such as 'application/pdf'.
Return
An associative array with the following keys.
- mime - The MIME Type string.
- ext - The corresponding file extension.
- text - TRUE if this MIME Type is a plain text format.
- title - Human readable file format description.
- short - Short human readable file format.
Example
// print information about the PDF file format
$mime_type = 'application/pdf';
$info = \io_comand_util\mime_type::get_info_from_mime_type($mime_type);
print_r($info);