helpers\BaseFileHelper getMimeTypeByExtension()

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.

doc_Yii
2016-10-30 17:04:44
Comments
Leave a Comment

Please login to continue.