Description
This function lists Apache MIME types.
Warning:
We strongly recommend that you use the following UAPI function instead of this function:
-
Mime::list_mime
— This function lists all of Apache's MIME types.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
system |
string |
Whether to show system-defined MIME types. |
|
no |
user |
string |
Whether to show user-defined MIME types. |
|
no |
Returns
Return |
Type |
Description |
Possible values |
Example |
extension |
string |
The file extension. |
A valid file extension. |
.txt |
origin |
string |
Whether the MIME type is user-defined or system-defined. |
|
system |
type |
string |
The MIME type. |
A valid MIME type. |
text/plain |
ext |
string |
The file extension. |
A valid file extension. |
.txt |
reason |
string |
A reason for failure. Note: This function only returns areason value if it failed. |
A string that describes the error. |
This is an error message. |
result |
boolean |
Whether the function succeeded. |
|
1 |