<?php
include 'metyl.class.php';
function testMe($f) {
$result = metyl::make($f);
echo 'fileName ' . $f;
if ($result->isValid()) {
echo " found! \n";
} else {
echo " not suitable! \n";
}
print_r($result);
}
testMe('Europa');
testMe(__FILE__);
exit;
/** Output of this :
fileName Europa found!
metyl Object
(
[name] => Europa
[baseName] => Europa
[extension] => jpeg
[mime] => image/jpeg; charset=binary
[mimeType] => image/jpeg
[encoding] => binary
[message] =>
[mappings] => Array
(
[0] => jpeg
[1] => jpg
[2] => jpe
[3] => jfif
)
[errorsFound:protected] =>
)
fileName /Users/bonn/Desktop/P3/phpClasses/metyl/demo.php not suitable!
metyl Object
(
[name] => /Users/bonn/Desktop/P3/phpClasses/metyl/demo.php
[baseName] => demo.php
[extension] => php
[mime] => text/x-php; charset=us-ascii
[mimeType] => text/x-php
[encoding] => us-ascii
[message] => extension php not like ???
[mappings] => Array
(
[0] => ???
)
[errorsFound:protected] => 1
)
*/
|