(PHP 4 >= 4.3.0, PHP 5)
The image_type_to_mime_type() function will determine the Mime-Type for an IMAGETYPE constant.
One of the IMAGETYPE_XXX constants
The returned values are as follows
Tabella 1. Returned values Constants
Esempio 1. image_type_to_mime_type (file)
<?phpheader("Content-type: " . image_type_to_mime_type(IMAGETYPE_PNG));?>
Nota: This function does not require the GD image library.