zlf / mime
v1.0.1
2024-04-30 14:11 UTC
Requires
- php: >=7.0
- ext-json: *
This package is not auto-updated.
Last update: 2024-10-29 16:26:51 UTC
README
需要支持php>=7,其他版本自行修改
使用示例
<?php
declare(strict_types=1);
use Zlf\Mime\Mime;
//获取已收录的所有格式的mime类型
Mime::getMimeData()
返回示例 array
[
'mp4' => 'video/mp4',
'jpg' => 'video/jpeg',
.
.
.
.
'png' => 'video/png',
]
//获取指定后缀的mime
Mime::getMime('png')
返回示例 string
image/png
//获取指定mime类型包含的格式
Mime::getExtention('video/x-matroska')
返回示例 [string]
['mkv','mk3d','mks']