Json ajax post返回403错误
我通过ajax post将json传递给我的php应用程序Json ajax post返回403错误,json,ajax,post,http-status-code-403,Json,Ajax,Post,Http Status Code 403,我通过ajax post将json传递给我的php应用程序 function ajax(url, json){ var xmlhttp = new XMLHttpRequest(); xmlhttp.open("POST", url, true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.timeout = 30000;
function ajax(url, json){
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("POST", url, true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.timeout = 30000;
xmlhttp.send(json);
}
在我的开发环境中(也就是在我自己的计算机上的XAMPP),一切正常,但是当我尝试在我的web服务器上运行它时,我得到了一个403错误
我注意到当我传递任何其他值时,比如一个简单的字符串或数字,我没有得到这个错误。当我尝试发布一些json时,就会发生这种情况,比如:
[[],[["6V^1",[],6]],1,"","",""]
有什么线索可以说明发生了什么,我如何解决这个问题吗