Skip to content

A PHP library to detect the mime type of a file.

License

Notifications You must be signed in to change notification settings

thebeline/PhpMimeType

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhpMimeType

A PHP library to detect the mime type of a file.

Build Status Coverage Status Dependency Status

Latest Stable Version Total Downloads

License

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 min. 5.6

Usage

$type = \MimeType\MimeType::getType('my-file.pdf'); // returns "application/pdf"

About

A PHP library to detect the mime type of a file.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 98.8%
  • Shell 1.2%