openlss / func-mimetype
Mimetype helper functions
0.0.7
2013-03-27 03:33 UTC
Requires
- php: >=5.3.2
This package is not auto-updated.
Last update: 2024-10-26 14:49:33 UTC
README
Mimetype helper functions
Usage
$file = 'test.html'; $mimetype = system_extension_mime_type($file); //returns text/html $ext = system_mime_type_extension('text/html'); //returns .html
Reference
(string) system_extension_mime_type($file)
Returns the mime type purely by file extension
(string) system_mime_type_extension($mimetype)
Returns the file extension assoicated with the mime type