PHP Класс MimeTypes
Usage:
getMimeType($filename, $uploadedName) attempts to return a verified mime type.
filename must be the actual location of the file!
uploadedName should be the filename according to the browser
returns null if verification of mime type fails
Note:
should use mime_content_type() in PHP >= 4.3.0
unfortunetly this returns application/octet-stream for too many images, making it's use limited
so the check currently just returns mimetype based on extension :-(
Example:
MimeTypes::getMimeType( $filename ) or die( "go away evil h@x0r!" );
Показать файл
Открыть проект
Примеры использования класса
Открытые свойства
Открытые методы
Описание методов
get_mimetype()
публичный статический Метод
Описание свойств
$mime_types публичное статическое свойство
public static $mime_types |