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
记录, 好习惯.
@gold3bear 已经在我的 Todo list 里面了, 很快就会有的. :sparkles:
@gold3bear
@pipalbreak 已经加上. https://phphub.org/topics/289
注意看里面有这句没 有就删除
disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server