Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 367 Bytes

README.md

File metadata and controls

14 lines (12 loc) · 367 Bytes

Install

composer require bermudaphp/detector

Usage

$detector = new FinfoDetector;

$detector->detectMimeType(file_get_contents('index.html')) // text/html;
$detector->detectExtension(file_get_contents('index.html')) // html;

$detector->detectFileMimeType('index.html') // text/html;
$detector->detectFileExtension('index.html') // html;