PHP Class 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!" );
Afficher le fichier Open project: zblogcn/zblogphp Class Usage Examples

Méthodes publiques

Свойство Type Description
$mime_types

Méthodes publiques

Méthode Description
get_mimetype ( $ext )

Method Details

get_mimetype() public static méthode

public static get_mimetype ( $ext )

Property Details

$mime_types public_oe static_oe property

public static $mime_types