nishadil/extmime
最新稳定版本:v1.1.0
Composer 安装命令:
composer require nishadil/extmime
包简介
PHP package for converting file MIME Type to extension and vice versa.
README 文档
README
The "Nishadil\Extmime" PHP package offers a convenient solution for developers seeking to effortlessly convert between file MIME types and extensions within their projects. By leveraging this package, developers can seamlessly map MIME types to file extensions and vice versa, simplifying file handling tasks.
How to install
To integrate "Nishadil\Extmime" into your project, simply clone this git repo or use Composer with the following command:
composer require nishadil/extmime
How to use
Get mime type from file extension
<?php use Nishadil\Extmime; $extmime = new Extmime; $result = $extmime->getExtension("image/jpeg"); echo $result; ?>
Output :
.jpg
Get extension from file mime type
<?php use Nishadil\Extmime; $extmime = new Extmime; $result = $extmime->getMimeType(".jpg"); echo $result; ?>
Output :
.image/jpeg
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-28