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
学习时的痛苦是暂时的 未学到的痛苦是终生的