public static tryMimeContentType ( string $file ) : string | ||
$file | string | File path |
return | string | Type detected. Empty string on failure |
public static function tryMimeContentType($file)
{
return function_exists('mime_content_type') ? mime_content_type($file) : '';
}