getMimeTypeByExtension() public static method
Determines the MIME type based on the extension name of the specified file.
This method will use a local map between extension names and MIME types.
| public static string getMimeTypeByExtension ( $file, $magicFile = null ) | ||
|---|---|---|
| $file | string |
The file name. |
| $magicFile | string |
The path (or alias) of the file that contains all available MIME type information. If this is not set, the file specified by $mimeMagicFile will be used. |
| return | string |
The MIME type. Null is returned if the MIME type cannot be determined. |
Please login to continue.