表格中的HTML表格不会通过POST发送所有可用数据

PiK*_*Key 3 php post

我有一个113行的表.每行有9个单元格,其中有一个输入,就像这个shema:

row_1[td_1],row_1[td_2],[...],
row_2[td_1],row_2[td_2],[...],
row_3[td_1],row_3[td_2],[...]
[...]
row_113[td_1],row_113[td_2],[...]
Run Code Online (Sandbox Code Playgroud)

问题:当我通过POST发送这些数据时,我只获取数据到row_112的第一个字段:

[...]  
["row_111"]=>
  array(9) {
    ["tytul"]=>
    string(15) "example element"
    ["pkwiu"]=>
    string(0) ""
    ["jm"]=>
    string(1) "2"
    ["ilosc"]=>
    string(1) "1"
    ["cena_brutto"]=>
    string(5) "74.00"
    ["vat"]=>
    string(3) "23%"
    ["vat_oryginalny"]=>
    string(2) "23"
    ["cena_netto"]=>
    string(5) "60.16"
    ["wartosc_brutto"]=>
    string(5) "74.00"
  }
  ["row_112"]=>
  array(1) {
    ["tytul"]=>
    string(15) "example element" <------
  }
Run Code Online (Sandbox Code Playgroud)

为什么我没有收到完整的表单数据?

这个例子可以在这里找到:http: //pastebin.com/ahVqUetJ

在脚本之上我简单地说:

<?php
    if(isset($_POST) && count($_POST) > 0) {
        var_dump($_POST);
        exit;
    }
?>
Run Code Online (Sandbox Code Playgroud)

Mih*_*rga 5

这是因为PHP 5.3.9他们为max_input_vars添加了限制,并且该限制为1000.

从111行的表单中得到111*9=999 + 1 (1个row_112)结果1000变量.

变更php.ini:

max_input_vars = 3000
suhosin.post.max_vars = 3000
suhosin.request.max_vars = 3000
suhosin.get.max_vars = 3000
Run Code Online (Sandbox Code Playgroud)

或者来自php:

ini_set('max_input_vars', 3000);
Run Code Online (Sandbox Code Playgroud)

或任何你想要的限制.