weixin_33722405 2015-06-19 02:37 采纳率: 0%
浏览 9

Ajax帖子大小限制

Background...

I'm using Handsontable.js to enable a user to manipulate a large number of rows of data. There are 4 columns represented in the object below as 'id' , 'order' ,'no' , and 'name'. When a user is satisfied with their edits, they will click a button and the data should be sent via ajax for processing. The data looks like ...

 Array
    (
        [0] => Array
            (
                [id] => 194
                [drawing] => Array
                    (
                        [order] => 
                        [no] => A0001
                        [name] => -
                    )
            )

    )

Problem...

the data object contains 464 elements (this number will vary greatly). Only 250 are received by the PHP script.

The Javascript....

function reorder(){
    var stuff = hot1.getData();

    $.ajax({
        url: '/php/listorder_processes.php',
        type: 'POST',
        data: { value: stuff },
        success: function(result) {
            console.log(result);
        }
    });
}

and the PHP...

$result = $_POST['value']
$count = count($result);
echo $count;

The result in the console is 250, while again 400+ items were sent.

My php.ini file has a post_max_size of 2000M - I dont think this is the issue.

I have considered comparing the original data object (that defines the data for the table) with the new data object (that which has been modified) - and only sending the pieces that have changed for processing, but the likelihood of that exceeding 250 is 100% - so I'm kind of stuck here.

Stringifying the object did not work.

Some similar posts also point to max_input_vars, but I'm not quite sure that's the problem either.

Scratch it - max input vars was the issue.

Thanks.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥25 matlab无法将表达式转换为双数组怎么解决?
    • ¥15 单片机汇编语言相关程序
    • ¥20 家用射频美容仪技术规格
    • ¥15 大家帮我看看为什么错了
    • ¥15 unity互动琴弦抖动效果
    • ¥15 做了个的二极管反向饱和电流测量电路,但是测试达不到效果
    • ¥15 nginx无证书访问https失败
    • ¥15 树莓派启动AP热点传入数据
    • ¥15 multisim中关于74ls192n和DSWPK开关的问题(相关搜索:计数器)
    • ¥15 在误装Windows server2019 后如何利用Windows.old恢复?