jQuery Ajax-在Ajax中发布巨大的字符串值

时间:2018-08-28 13:08:55

标签: php jquery ajax

我已经尝试了以下链接,但是在我的服务器上无法正常工作。 Jquery Ajax - post huge string value

1 个答案:

答案 0 :(得分:0)

尝试这个

    $.ajax({
            type: "POST",
            url: "your_url",
            data: {string:3MB_string},
            contentType: "application/json",
            dataType: "json",
            success: function (data) {
                if (data == undefined) {
                    alert("Error : 219");
                }
                else {
                    alert(data.d);
                }
            },
            error: function (data) {
                if (data == undefined) {
                    alert("Error : 465");
                }
                else {
                    alert("Error : 468 " + data.d);
                }
            }
        });