我的Laravel应用程序无法验证上传的图像.它返回此错误消息:
Unable to guess the mime type as no guessers are available (Did you
enable the php_fileinfo extension?)
我知道在php.ini上启用php_fileinfo.dll / php_fileinfo.so会修复它.但我无法访问我的远程服务器的php.ini文件.
所以我认为有没有其他方法可以启用它?如何?也许我可以使用PHP的ini_set()方法?我尝试使用它像:
ini_set('extension', 'php_fileinfo.so');
但它不起作用.
我还读到你可以使用.htaccess文件覆盖php.ini设置.但是怎么样?
作为Laravel的默认文件,我的.htaccess文件是:
Options -MultiViews
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$/$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
你应该怎么把这些额外的东西放在那里?