|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-13 12:38 UTC] wiesemann@php.net
[2006-04-13 13:06 UTC] nimshon at gmail dot com
[2006-04-14 08:29 UTC] mike@php.net
[2006-04-24 15:35 UTC] nimshon at gmail dot com
[2006-09-27 09:54 UTC] florin dot cojocarut at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 19:00:01 2025 UTC |
Description: ------------ Error in the Fileinfo Package, can't use it... (I have php 5.1.2 but it doesn't appear in the versions list) Reproduce code: --------------- <?php $finfo = finfo_open(FILEINFO_MIME); // return mime type ala mimetype extension foreach (glob("*") as $filename) { echo finfo_file($finfo, $filename) . "\n"; } finfo_close($finfo); ?> (Taken from the manual http://www.php.net/manual/en/function.finfo-file.php ) Expected result: ---------------- i expected the page to display the mimetypes of the files in the script's dir Actual result: -------------- Warning: finfo_open() [function.finfo-open]: Failed to load magic database at ''. in /usr/home/http/html/fileinfo.php on line 10 Warning: finfo_file(): supplied argument is not a valid file_info resource in /usr/home/http/html/fileinfo.php on line 13 (...)