承接 nishadil/extmime 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-28