做了一个上传图片的功能,在本地上传通过,服务器报 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. <img>的title和Alt有什么区别?

    Alt是<img>的特有属性,是图片内容的等价描述,用于图片无法加载时显示,读屏器阅读图片. title 可提高图片高可访问性,除了纯装饰图片外都必须设置有意义的值,搜索引擎会重点分析.鼠 ...

  2. html页面自适应宽度

    html页面实现响应式的方式有很多,本篇介绍懒人必备一招见效的方法. 在head标签中加入 <meta name="viewport" content="width ...

  3. python路径相关技巧

    在文件C:\work\python\rqalpha\rqalpha\utils\config.py 找文件:C:\work\python\rqalpha\rqalpha\config.yml 则通过下 ...

  4. Python - Django - AJAX 实现 POST 请求

    index.html: <input type="text" id="i1">+ <input type="text" i ...

  5. MyBatis插入记录时返回主键id的方法

    有时候插入记录之后需要使用到插入记录的主键,通常是再查询一次来获取主键,但是MyBatis插入记录时可以设置成返回主键id,简化操作,方法大致有两种. 对应实体类: public class User ...

  6. HUSTOJ搭建后为了方便作为Judger调用进行的一些修改操作

    这里的操作主要包括: 找到初始的MySQL数据库用户名和密码: 将 csrf 设置为固定值: 取消掉同一用户相邻提交时间间隔需要10秒钟的限制. 内容如下: 系统:ubuntu18.04.2 hust ...

  7. [LeetCode] 504. Base 7 基数七

    Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: "202&q ...

  8. kali 扫描之burp Suite学习笔记1

    1 安装 2 burs功能图解 3 工具栏详解 4 实战 (1) 网络配置 一台kali 一台msf 网络采用nat nat网络设置方法: 查看路由 配置文件 (2) 代理设置 bur代理设置 浏览器 ...

  9. MySQL执行计划值type,强烈推荐

    表结构: create table user ( id int primary key, name varchar(), sex varchar(), index(name) )engine=inno ...

  10. 【剑指offer】面试题 18. 删除链表的节点

    面试题 18. 删除链表的节点