Location: PHPKode > scripts > File MIME Script > example.php
<pre><?php
//File MIME Class Exampke
include "mime.class.php";

$mime = new MIME();

//directly
echo $mime->EXTtoMIME("txt")."\n";
echo $mime->EXTtoMIME("doc")."\n";
echo $mime->EXTtoMIME("jpg")."\n";

echo "\n\n\n";

//return array
print_r($mime->MIMEtoEXT("application/mime"))."\n";
print_r($mime->MIMEtoEXT("text/css"))."\n";
print_r($mime->MIMEtoEXT("text/html"))."\n";	//multiple values
?>
Return current item: File MIME Script