1.2.1514. ext/fileinfo¶
Extension ext/fileinfo.
This module guesses the content type and encoding of a file by looking for certain magic byte sequences at specific positions within the file.
<?php
$finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime type ala mimetype extension
foreach (glob('*') as $filename) {
echo finfo_file($finfo, $filename) . PHP_EOL;
}
finfo_close($finfo);
?>
See also Filinfo.
1.2.1514.1. Specs¶
Short name |
Extensions/Extfileinfo |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |