Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.