SproutCMS

This is the code documentation for the SproutCMS project

function mimetype()

Return the mimetype for a given filename.

Only uses the extension - doesn't actually check the file
If you need deep checking, take a look at File::checkFileContentsExtension
If the extension is unrecognised, returns 'application/octet-stream'.

Usage

string File::mimetype ( string $filename );

Arguments

  1. string $filename

Return value

  • string
    E.g. 'image/png'