PHP code example of green-spot / mime-type
1. Go to this page and download the library: Download green-spot/mime-type library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
green-spot / mime-type example snippets
use GreenSpot\Utils\MimeType;
MimeType::get("photo.jpg");
// => image/jpeg
MimeType::get("jpg");
// => image/jpeg
MimeType::toExtension("image/jpeg");
// => jpg