MIME_CONTENT_TYPE(3) 1 MIME_CONTENT_TYPE(3)
mime_content_type - Detect MIME Content-type for a file (deprecated)
SYNOPSIS
string mime_content_type (string $filename)
DESCRIPTION
Returns the MIME content type for a file as determined by using information from the magic.mime file.
PARAMETERS
o $filename
- Path to the tested file.
RETURN VALUES
Returns the content type in MIME format, like text/plain or application/octet-stream.
NOTES
Warning
This function has been deprecated as the PECL extension Fileinfo provides the same functionality (and more) in a much cleaner way.
EXAMPLES
Example #1
mime_content_type(3) Example
<?php
echo mime_content_type('php.gif') . "
";
echo mime_content_type('test.php');
?>
The above example will output:
image/gif
text/plain
SEE ALSO
Fileinfo for a replacement .
PHP Documentation Group MIME_CONTENT_TYPE(3)