Jump to content

mime_magic file


JustFoo

Recommended Posts

Hello all,

I am attempting to use the mime_content_type('filename') function that comes in the mime_magic dll, I followed all instructions to set it up and edited the php.ini file and restarted the server and this morning it worked 2 times then just stopped working for some reason.  The script i had running doesnt show the mimetype of files anymore. 

Script:
$file = "\\pathToFile\\php.gif";
echo mime_content_type($file);

php.ini:
extension=php_mime_magic.dll
[mime_magic]
mime_magic.debug = on
mime_magic.magicfile = "c:\PHP\extras\magic.mime"

thanks for any help
JustFoo

Link to comment
https://forums.phpfreaks.com/topic/14294-mime_magic-file/
Share on other sites

same exact error idk why but a little while ago it worked fine the way i had the script it returned image/gif and then i tried a different file and it returned that mime type then when i tried a third file it just stopped printing out the type and then i did a is_function(mime_content_type) and it told me that its not a function and now im here...

Link to comment
https://forums.phpfreaks.com/topic/14294-mime_magic-file/#findComment-56221
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.