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

 
 

Unable to guess the mime type as no guessers are available 2 9的更多相关文章

  1. laravel 下载报错:Unable to guess the mime type as no guessers are available

    在使用laravel的download()函数实现下载功能时,报错如下:Unable to guess the mime type as no guessers are available (Did ...

  2. Unable to guess the mime type as no guessers are available (Did you enable the php_fileinfo extension?)

    原因是没有开启php的php_fileinfo扩展,开启即可. 找到php.ini文件,搜索到php_fileinfo,去掉前面的分号,然后重启服务器apache.nginx下同理. extensio ...

  3. MIME Type

    一.首先,我们要了解浏览器是如何处理内容的.在浏览器中显示的内容有 HTML.有 XML.有 GIF.还有 Flash --那么,浏览器是如何区分它们,决定什么内容用什么形式来显示呢?答案是 MIME ...

  4. Chrome: Resource interpreted as Font but transferred with MIME type font/x-woff

    最近,项目中加入了Bootstrap进行界面优化,但是,项目加载运行之后,控制台总是提示以下错误信息: GET http://localhost:8080/.../fonts/fontawesome- ...

  5. Resource interpreted as Script but transferred with MIME type text/plain:

    我用script做ajax跨域,请求返回的是个文本字符串,chrome提示:Resource interpreted as Script but transferred with MIME type ...

  6. solrj6.2异常--Expected mime type application/octet-stream but got text/html.

    org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://19 ...

  7. odoo 错误 Resource interpreted as Stylesheet but transferred with MIME type application/x-css:

    odoo8   页面内容显示一半,  web 控制台显示错误  Resource interpreted as Stylesheet but transferred with MIME type ap ...

  8. solr异常--Expected mime type application/octet-stream but got text/html.

    Exception in thread "main" org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrExce ...

  9. Chrome 报 Resource interpreted as Script but transferred with MIME type text/plain 警告的解决办法

    http://www.2cto.com/os/201312/262437.html 安装了VS2012之后,chrome在加载页面的时候会报 Resource interpreted as Scrip ...

随机推荐

  1. Java基础 throws 提示调用方法时要注意处理相关异常

        JDK :OpenJDK-11      OS :CentOS 7.6.1810      IDE :Eclipse 2019‑03 typesetting :Markdown   code ...

  2. bind 0.0.0.0的作用是什么呢?

    背景描述: 今天在看redis的内容,看到同事在配置文件中将bind配置为0.0.0.0进行监听,不明白什么意思就查询了下,在此记录下. 解释: 0.0.0.0在服务器的环境中,指的就是服务器上所有的 ...

  3. Nginx 配置 HTTP 代理

    配置如下 #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; ...

  4. tensorflow2.0手写数字识别

    import tensorflow as tf import matplotlib.pyplot as plt import numpy as np datapath = r'D:\data\ml\m ...

  5. Kubernetes 存储卷管理 PV&PVC(十)

    目录 一.emptyDir 二.hostPath 三.PV & PVC 1.NFS PersistentVolume 2.创建 PVC 3.创建 Pod 进行挂载 为了持久化保存容器的数据,可 ...

  6. 【VS开发】 Windows平台下管道的使用

    转载地址: 管道分类: 1. 匿名管道: 只能用于相关进程(如父子进程,兄弟进程),并在他们之间建立内存区域,进程终止后,匿名管道也就消失了. 通常用于:重定向子进程的标准输入输出,以便和父进程交换数 ...

  7. vue-cli3 element 分页组件el-pagination的基本使用

    <!--分页组件--> <el-pagination :total="total" :current-page="currentPage" : ...

  8. idea打开Run Dashboard

    在springcloud中,通常会开启多个微服务.单个一个个开就很麻烦 如果没有发现,可以在工程目录下找.idea文件夹下的workspace.xml,在其中增加如下组件 <component ...

  9. phpexcel无法导出的解决方法

    phpexcel无法导出的解决方法 <pre> set_time_limit(0); ini_set("memory_limit","512M"); ...

  10. ES6新增的一些特性

    1.let关键字,用来代替 var的关键字,特点: 1.变量不允许被重复定义 2.不会进行变量声明提升 3.保留块级作用域中i的 2.const定义常量,特点:1.常量值不允许被改变 2.不会进行变量 ...