class Mime (View source)

Properties

static $mime_types_and_extensions

Methods

string|bool
mimeFromExtension(string $ext)

Converts a file extension into a mime type.

string|bool
mimeToExtension(string $mimeType)

Converts a known mime-type into it's common file extension.

Details

string|bool mimeFromExtension(string $ext)

Converts a file extension into a mime type.

Parameters

string $ext

Return Value

string|bool

mime type string or false

string|bool mimeToExtension(string $mimeType)

Converts a known mime-type into it's common file extension.

Returns the first match from $mime_types_and_extensions.

Parameters

string $mimeType

Return Value

string|bool

extension string or false