openlss / func-mimetype
MIME 类型辅助函数
0.0.7
2013-03-27 03:33 UTC
Requires
- php: >=5.3.2
This package is not auto-updated.
Last update: 2024-09-14 14:09:07 UTC
README
MIME 类型辅助函数
用法
$file = 'test.html'; $mimetype = system_extension_mime_type($file); //returns text/html $ext = system_mime_type_extension('text/html'); //returns .html
参考
(string) system_extension_mime_type($file)
仅通过文件扩展名返回 MIME 类型
(string) system_mime_type_extension($mimetype)
返回与 MIME 类型关联的文件扩展名