Unable to guess the mime type as no guessers are available 2 9

做了一个上传图片的功能,在本地上传通过,服务器报 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

 
 
posted @ 2019-07-04 10:14  爱你爱自己  阅读(803)  评论(0编辑  收藏  举报