public static function mimetype_from_file($fullpath) {
        if (file_exists($fullpath)) {
            // The type is unknown. Attempt to look up the file type now.
            $finfo = new finfo(FILEINFO_MIME_TYPE);
            return mimeinfo_from_type('type', $finfo->file($fullpath));
        }

        return 'document/unknown';
    }
public static function mimetype_from_file($fullpath) {
        if (file_exists($fullpath)) {
            // The type is unknown. Attempt to look up the file type now.
            $finfo = new finfo(FILEINFO_MIME_TYPE);
            return mimeinfo_from_type('type', $finfo->file($fullpath));
        }

        return 'document/unknown';
    }
public static function mimetype_from_file ( $ fullpath ) { if ( file_exists ( $ fullpath ) ) { // The type is unknown. Attempt to look up the file type now. $ finfo = new finfo ( FILEINFO_MIME_TYPE ) ; return mimeinfo_from_type ( 'type' , $ finfo -> file ( $ fullpath ) ) ; } return 'document/unknown' ; }
Inspect a file on disk for it's mimetype.

@param string $fullpath Path to file on disk
@return string The mimetype
Inspect a file on disk for it s mimetype .