Download the PHP package dfridrich/php-mime-type without Composer
On this page you can find all versions of the php package dfridrich/php-mime-type. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dfridrich/php-mime-type
More information about dfridrich/php-mime-type
Files in dfridrich/php-mime-type
Package php-mime-type
Short Description Simple PHP class for guessing file mime type based on file extension with ability to use in Symfony project.
License MIT
Homepage https://github.com/dfridrich/PhpMimeType
Informations about the package php-mime-type
PhpMimeType v3
Simple PHP class for guessing file mime type based on file extension with ability to use in Symfony project.
Install
Usage
Basic usage
Symfony response
If you want to use Symfony response feature, install HTTP Foundation package too.
Just pass the file name or SPL object to response method and you will get Symfony\Component\HttpFoundation\Response object. Disposition is attachment by default, you can chage it to inline or use Symfony ResponseHeaderBag's constants DISPOSITION_ATTACHMENT or DISPOSITION_INLINE.
More examples and documentation
See more examples.
API documentation can be found here.
Testing
Credits
Contributors
- Dennis Fridrich
- Nick Shek
- Giso Stallenberg
- sml-joyo
Thanks to...
- freepik.com - it provided photo in logo
- svogal - this guy inspired me to create this library
- colemanw - his gist inspired me to add FontAwesome support
License
The MIT License (MIT). Please see License File for more information.