jQuery Ajax发布错误414请求URI太大 [英] jquery ajax post error 414 request-URI Too Large
本文介绍了jQuery Ajax发布错误414请求URI太大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须发送大约950个参数,但是我总是出现错误http 414
i must send about 950 post params, but i have always error http 414
我尝试使用此代码,但不起作用
i try to use this code, but don't work
var data.param1="aaa1";
//.......repeat 950 times
var data.param950="aaa950";
var proccessData=false;
var type="post";
var dataType="json";
jQuery.ajax({
type: type,
url: "file.php",
data: data,
async: false,
//dataType: 'application/json',
dataType: dataType,
proccessData: proccessData
});
还具有dataType:'application/json'不起作用.我所有的尝试都失败了.我已经阅读了各种解决方案,但是没有用
also with dataType: 'application/json' don't work. all my attempts failed. I have read the various solutions but no I work
你有什么主意吗?
推荐答案
问题出在php.ini中
the problem is into php.ini
max-input-vars = 1000
max-input-vars = 1000
我发送了1000多个参数(chars> 35000),apache.conf始终有Directive LimitRequestLine 2000
I was sending over 1000 parameters (chars > 35000), the apache.conf has always Directive LimitRequestLine 2000
这篇关于jQuery Ajax发布错误414请求URI太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文