katzien/php-mime-type
最新稳定版本:2.1.0
Composer 安装命令:
composer require katzien/php-mime-type
包简介
A PHP library to detect the mime type of files.
关键字:
README 文档
README
A PHP library to detect the mime type of a file.
Not invented here
This is a modernised version of Jason Sheets's mimetype class.
Installation
To add the PhpMimeType library to your project run
composer require katzien/php-mime-type
from the directory where your composer.json file is.
See Packagist for more details.
Version Guidance
| Version | Status | PHP version required |
|---|---|---|
| 1.x | Maintained | min. 5.3 |
| 2.x | Latest (recommended) | min. 5.6 |
If you're using PHP 5.6 or higher, you should use the latest 2.x version. There is no difference in usage between 1.x and 2.x, so the upgrade should not require any code changes.
Differences between 1.x and 2.x:
- syntax
- versions of composer dependencies
Usage
$type = \MimeType\MimeType::getType('my-file.pdf'); // returns "application/pdf"
统计信息
- 总下载量: 70.76k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-19