Hi
I'm trying to use Fileinfo in my code to get the mime type of some files.
I've tried everything that is on the manual but it's not working.
Here is my configuration:
PHP 5.1.2
Apache 2.0.55
Windows XP
My php.ini is modified with this :
extension=php_fileinfo.dll
[mime_magic]
mime_magic.debug = On
mime_magic.magicfile = "c:\PHP\extras\magic.mime"
But when I try to use Fileinfo this way:
$info = new finfo(FILEINFO_MIME, "c:\PHP\extras\magic.mime") ;
echo $info->file('c:\test.gif');
I got this error:
Warning: finfo::finfo() [function.finfo]: Failed to load magic database at 'c:\PHP\extras\magic.mime'.
I have tried to change the Path to unix style with / instead of \, and also tried with ' instead of ", I have tested with apache magic database, with php magic database, with no result.
Any ideas??
Thank you very much!
Esteban