有没有大小限制为Ajax的帖子? [英] Is there any size limitation for ajax post?

查看:173
本文介绍了有没有大小限制为Ajax的帖子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过Ajax发布CKEditor的内容为php。但是,让4-5句话贴材料在我的数据库表。我想知道,有没有大小限制为Ajax的帖子?有没有办法通过AJAX张贴大的文本内容是什么?

我的js看起来像

 函数postViaAjax(autosaveMode){
    变种名称= $(#NAME)VAL()。
    VAR标题= $(#题)VAL()。
    。VAR菜单= $(#菜单)VAL();
    。VAR parentcheck = $(。parentcheck:检查)VAL();
    VAR ID = $(#ID)VAL()。
    如果(parentcheck == 0){
        VAR父= parentcheck;
    } 其他 {
        VAR父母= $(#父)VAL()。
    }
    。VAR内容= CKEDITOR.instances ['内容']的getData();
    VAR dataString =NAME ='+名字+'和;标题='+标题+'和;菜单='+菜单+'和; parentcheck ='+ parentcheck +'和ID ='+ ID +'和亲='+父母+'和;内容='+内容;
    $阿贾克斯({
        键入:POST,
        网址:处理器/ dbadd.php
        数据:dataString,
        数据类型:JSON,
        成功:函数(结果,状态,xResponse){
            VAR消息= result.msg;
            VAR ERR = result.err;
            变种现在=新的日期();
            如果(消息!= NULL){
                如果(autosaveMode){
                    $('#的submit_btn)。ATTR({
                        价值:Yaddasaxlanıldı'+ now.getHours()+:+ now.getMinutes()+:+ now.getSeconds()
                    });
                } 其他 {
                    $ .notifyBar({
                        CLS:成功,
                        HTML:消息+''+ now.getHours()+:+ now.getMinutes()+:+ now.getSeconds()
                    });
                }
            }
            如果(犯错!= NULL){
                $ .notifyBar({
                    CLS:错误,
                    HTML:ERR
                });
            }
        }
    });
};
 

解决方案

HTTP规范没有规定具体的大小限制的职位。它们将通常由任一网络服务器或用于处理表单提交的编程技术来限定。

你用什么样的服务器?

I'm posting ckeditor content via Ajax to php. But getting 4-5 sentence of posted material in my db table. I wonder, Is there any size limitation for ajax post? is there any way to post big text contents via ajax?

My js looks like that

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
                });
            }
        }
    });
};

解决方案

The HTTP specification doesn't impose a specific size limit for posts. They will usually be limited by either the web server or the programming technology used to process the form submission.

What kind of server do you use?

这篇关于有没有大小限制为Ajax的帖子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆