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 蓝牙硬件,可以用哪几种方法控制手机点击和滑动
    • ¥15 生物医学数据分析。基础课程就v经常唱课程舅成牛逼
    • ¥15 云环境云开发云函数对接微信商户中的分账功能
    • ¥15 空间转录组CRAD遇到问题
    • ¥20 materialstudio计算氢键脚本问题
    • ¥15 有没有代做有偿主要做数据可视化部分即可(2023全国高考更省一本线理科类)
    • ¥15 配置FPT报错,该如何处理
    • ¥15 请大家看一下这个代码咋写,一点思路都没有,最好能做一下,不要伪代码,有偿
    • ¥15 有偿请人帮写个安卓系统下禁止装软件及禁止拷入文件的程序
    • ¥100 用 H.265 对音视频硬编码 (CUDA)