PHP code example of openlss / func-mimetype

1. Go to this page and download the library: Download openlss/func-mimetype 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/ */

    

openlss / func-mimetype example snippets


$file = 'test.html';
$mimetype = system_extension_mime_type($file); //returns text/html
$ext = system_mime_type_extension('text/html'); //returns .html