Supported Versions: PHP >= 5.3.0, PHP 7, PHP 8, PECL fileinfo >= 0.1.0
Create a new finfo instance
<?php finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): finfo|false
<?php     public function mimeType($path)

    {

        return finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path);

    }