ajax帖子有任何大小限制吗?

The*_*der 10 javascript ajax jquery post

我通过Ajax将ckeditor内容发布到php.但是在我的数据库表中获得了4-5个已发布材料的句子.我想知道,ajax帖子有任何大小限制吗?有没有办法通过ajax发布大文本内容?

我的js看起来像那样

function postViaAjax(autosaveMode) {
    var name = $("#name").val();
    var title = $("#title").val();
    var menu = $("#menu").val();
    var parentcheck = $(".parentcheck:checked").val();
    var id = $("#id").val();
    if (parentcheck == 0) {
        var parent = parentcheck;
    } else {
        var parent = $("#parent").val();
    }
    var content = CKEDITOR.instances['content'].getData();
    var dataString = 'name=' + name + '&title=' + title + '&menu=' + menu + '&parentcheck=' + parentcheck + '&id=' + id + '&parent=' + parent + '&content=' + content;
    $.ajax({
        type: "POST",
        url: "processor/dbadd.php",
        data: dataString,
        dataType: "json",
        success: function (result, status, xResponse) {
            var message = result.msg;
            var err = result.err;
            var now = new Date();
            if (message != null) {
                if (autosaveMode) {
                    $('#submit_btn').attr({
                        'value': 'Yadda saxlan?ld? ' + now.getHours() + ':' + now.getMinutes() + ':' + now.getSeconds()
                    });
                } else {
                    $.notifyBar({
                        cls: "success",
                        html: message + ' ' + now.getHours() + ':' + now.getMinutes() + ':' + now.getSeconds()
                    });
                }
            }
            if (err != null) {
                $.notifyBar({
                    cls: "error",
                    html: err
                });
            }
        }
    });
};
Run Code Online (Sandbox Code Playgroud)

yop*_*amo 10

HTTP规范没有对帖子强加特定的大小限制.它们通常受到Web服务器或用于处理表单提交的编程技术的限制.

你用的是什么类型的服务器?


kuf*_*ufi 5

HTTP 中的 POST 没有任何大小限制。

也许你的内容变量中有一个 & 。然后之后的所有内容都将被剥离。

除此之外,您对数据库中的数据列使用什么类型?是不是有点像 varchar(1000) 之类的东西?然后任何更大的东西也会被剥离。

检查您在服务器端实际收到的内容,以便您知道代码或数据库是否有问题。