Php 406仅firebug上的错误

Php 406仅firebug上的错误,php,javascript,jquery,Php,Javascript,Jquery,我用的是这个家伙的剧本 A.瓦卢姆 一切都很好,直到文件完成上传,我得到一个406错误的firebugONLY。当我右键单击firebug上的链接并在新窗口中打开时,该文件确实存在,并且执行了我期望它执行的操作 firebug上的页面说 Not Acceptable An appropriate representation of the requested resource upload.php could not be found on this server. Additionally

我用的是这个家伙的剧本

A.瓦卢姆

一切都很好,直到文件完成上传,我得到一个406错误的firebugONLY。当我右键单击firebug上的链接并在新窗口中打开时,该文件确实存在,并且执行了我期望它执行的操作

firebug上的页面说

Not Acceptable An appropriate representation of the requested resource upload.php could not be found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. 但是当我在一个新的选项卡上看到这个页面时,它工作正常并返回正确的内容,a.Valums上的脚本附带了ajax请求

更新


看看HTTP头。您的JavaScript可能添加了一个Accept头,服务器认为它没有合适的数据类型来响应。

这是一个服务器错误。需要禁用一个名为mod_security的东西,我不知道它是什么,但如果遇到问题,请询问您的主机提供商,他们应该知道:

`xhr.setRequestHeaderX-request-With,XMLHttpRequest;xhr.setRequestHeaderX-File-Name,encodeURIComponentname;xhr.setRequestHeaderContent-Type,应用程序/八位字节流;`这就是javascript中关于头的内容查看实际发送的头,不仅仅是那些你用JavaScript指定的。现在将接受的东西列表与upload.php寻找的东西进行比较。老实说,我不知道我在寻找什么,我应该向php添加什么header@Val:如果正确使用,则应输出JSON字符串。mod_security在Apache中执行一些基本的入侵检测-它检查传入的数据特定的请求头用于潜在的坏东西,并阻止坏东西。我知道很多:但是+1对于其他可能发现它有用的人: Host www.example.com User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-gb,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Content-Type application/octet-stream Referer http://www.example.com Content-Length 192378 Cookie