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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Stata链式中介效应代码修改
    • ¥15 latex投稿显示click download
    • ¥15 请问读取环境变量文件失败是什么原因?
    • ¥15 在若依框架下实现人脸识别
    • ¥15 网络科学导论,网络控制
    • ¥100 安卓tv程序连接SQLSERVER2008问题
    • ¥15 利用Sentinel-2和Landsat8做一个水库的长时序NDVI的对比,为什么Snetinel-2计算的结果最小值特别小,而Lansat8就很平均
    • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
    • ¥15 关于arduino编程toCharArray()函数的使用
    • ¥100 vc++混合CEF采用CLR方式编译报错