3
ini_set('error_reporting', E_ALL);
4
require 'MIME/Type.php';
6
$type = 'application/x-test-app; foo="bar" (First argument); bar=baz (Second argument)';
7
$type2 = 'application/vnd.pear.test-type';
9
print "Checking type: $type\n";
10
if (MIME_Type::isExperimental($type)) {
11
print "Type is experimental\n";
13
print "Type is not experimental\n";
16
print "\nChecking type: $type2\n";
17
if (MIME_Type::isVendor($type2)) {
18
print "Type is vendor-specific\n";
20
print "Type is not vendor-specific\n";
23
$file = '@doc_dir@/MIME_Type/example.php';
24
print "\nChecking type of: $file\n";
25
$type = MIME_Type::autoDetect($file);
26
if (PEAR::isError($type)) {
27
print 'Error: ' . $type->getMessage() . "\n";