Function __global->get_mime_type
Definitions
sources/mime_types.php
- Find the mime type for the given file extension. It does not take into account whether the file type has been safelisted or not, and returns a binary download mime type for any unknown extensions.
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: string
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$extension | string | required parameter | N/A | N/A | The file extension (no dot) |
$as_admin | boolean | required parameter | N/A | N/A | Whether there are admin privileges, to render dangerous media types (client-side risk only) |
Return
- The MIME type
- Type: string
- Set: N/A
- Range: N/A