做了一个上传图片的功能,在本地上传通过,服务器报 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. (转)tomcat 安全配置文档

    原文:https://www.cnblogs.com/heaven-xi/p/9961354.html 1.配置文档中使用$CATALINA_HOME变量声明为tomcat的安装目录并明确写出了tom ...

  2. python中video system not initialized怎么解决

    今天在github上找到一个用pygame做的Python游戏,但是clone到本地运行的时候却冒出了“mixer system not initialized”这样的问题.其实这句话说的就是音频混音 ...

  3. Java的方法类型

    1.无参数无返回值的方法 package com.imooc.method; public class MethodDemo { public static void printStar() { Sy ...

  4. 筛选出dataframe中全为数字的列的值

    In [1]: import pandas as pd In [2]: import numpy as np In [3]: students = [ ('jack', 'Apples' , 34) ...

  5. 【技术】Arduino PID自整定库

    最近看到了Brett Beauregard发表的有关PID的系列文章,感觉对于理解PID算法很有帮助,于是将系列文章翻译过来!在自我提高的过程中,也希望对同道中人有所帮助.作者Brett Beaure ...

  6. [LeetCode] 52. N-Queens II N皇后问题 II

    The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens ...

  7. 创建 django 项目命令

    创建Django项目 django-admin startproject HelloWorld Django创建app cd HelloWorld python manage.py startapp ...

  8. 笨办法学python 习题14 优化过 遇到问题的请看

    print "\t what's you name?"user_name = raw_input('>') from sys import argvscript, = arg ...

  9. Nginx限制访问速率和最大并发连接数模块--limit (防范DDOS攻击)

    Tengine版本采用http_limit_req_module进行限制 具体连接请参考 http://tengine.taobao.org/document_cn/http_limit_req_cn ...

  10. The Day Two 找到一个具有最大和的连续子数组,返回其最大和

    """ 给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和. 示例: 输入: [-2,1,-3,4,-1,2,1,-5, ...