-
Notifications
You must be signed in to change notification settings - Fork 3
MIME::typeForExt
Mo McRoberts edited this page Aug 7, 2011
·
1 revision
Return the MIME type matching a specified file extension
uses('mime');
public static function [[MIME]]::typeForExt(string [in] $ext)
MIME::typeForExt() attempts to resolve a file extension to a MIME
type.
The file extension, $ext, may be specified with or without a
leading dot.
If the file extension could not be mapped to a MIME type, null
is returned.
| Name | Direction | Type | Description |
|---|---|---|---|
$ext
|
in | string | The file extension to resolve to a MIME type |
string The MIME type matching $ext, if it could be resolved, or null otherwise.