public static function mime_type($file)  {
		$handle = finfo_open(FILEINFO_MIME);
		$mime_type = finfo_file($handle,$file);

		if (strpos($mime_type, ';')) {
			$mime_type = preg_replace('/;.*/', ' ', $mime_type);
		}

		return trim($mime_type);
	}
public static function mime_type($file)  {
		$handle = finfo_open(FILEINFO_MIME);
		$mime_type = finfo_file($handle,$file);

		if (strpos($mime_type, ';')) {
			$mime_type = preg_replace('/;.*/', ' ', $mime_type);
		}

		return trim($mime_type);
	}
public static function mime_type ( $ file ) { $ handle = finfo_open ( FILEINFO_MIME ) ; $ mime_type = finfo_file ( $ handle , $ file ) ; if ( strpos ( $ mime_type , ';' ) ) { $ mime_type = preg_replace ( '/;.*/' , ' ' , $ mime_type ) ; } return trim ( $ mime_type ) ; }
Fetches the mime type for a certain file

@param string $file The path to the file
@return string $mime_type
Fetches the mime type for a certain file