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!" );
Mostra file
Open project: zblogcn/zblogphp
Class Usage Examples
Public Properties
Public Methods
Method Details
get_mimetype()
public static method
Property Details
$mime_types public_oe static_oe property
public static $mime_types |