Unable to guess the mime type as no guessers are available - 80后奋斗青年的博客

Unable to guess the mime type as no guessers are available

做了一个上传图片的功能,在本地上传通过,服务器报bug

Unable to guess the mime type as no guessers are available(Did you enable the php_fileinfo extension?)
主要原因是php_fileinfo未被开启.

解决

找到php.ini

$ php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/php/etc
Loaded Configuration File => /usr/local/php/etc/php.ini
开启php_fileinfo

$ vim /usr/local/php/etc/php.ini
找到:;extension=php_fileinfo.dll去掉分号, windows是dll但如果是linux系统的话应该是 extension=php_fileinfo.so

标签:none

添加新评论