我找不到任何合适的answeres所以我想问一个新的问题。
I can't find any suitable answeres so I ask a new question.
我工作的一个更大的web应用。现在,在第一部分的应用程序,我收集现有表数据(<表类=为myContent> ...< /表>
)使用jQuery。 code没有问题,在这一点上。
I am working on a bigger webapplication. Now in one Part of the app I collect data from an existing table (<table class="myContent">...</table>
) with jQuery. Code doesn't matters at this point.
会发生什么事,我创建它内容的阵列,它工作正常。内容看起来像
What happens is, I create a Array with content in it and it works fine. Content looks like
Array
(
[artikel] => Array
(
[0] => Array
(
[id] => 602145-69430
[name] => Legraphic 2 Top
[farbe] => Cashmere Blue mix
[menge] => 0
[epreis] => 25.95
[gpreis] => 0.00
[uvp] => 64.90
[grt1] => XS
[grt2] => S
[grt3] => M
[grt4] => L
[grt5] => XL
[grt6] => XXL
[grt7] => 0
[grt8] => 0
[grt9] => 0
[grt10] => 0
[grt11] => 0
[grt12] => 0
[gr1] =>
[gr2] =>
[gr3] =>
[gr4] =>
[gr5] =>
[gr6] =>
[gr7] =>
[gr8] =>
[gr9] =>
[gr10] =>
[gr11] =>
[gr12] =>
[ldate] => LD: 01.02.2015 - 28.02.2015
)
[1] => Array
(
[id] => 602145-60430
[name] => Legraphic 2 Top
[farbe] => Cashmere Blue
[menge] => 0
[epreis] => 25.95
[gpreis] => 0.00
[uvp] => 64.90
[grt1] => XS
[grt2] => S
[grt3] => M
[grt4] => L
[grt5] => XL
[grt6] => XXL
[grt7] => 0
[grt8] => 0
[grt9] => 0
[grt10] => 0
[grt11] => 0
[grt12] => 0
[gr1] =>
[gr2] =>
[gr3] =>
[gr4] =>
[gr5] =>
[gr6] =>
[gr7] =>
[gr8] =>
[gr9] =>
[gr10] =>
[gr11] =>
[gr12] =>
[ldate] => LD: 01.02.2015 - 28.02.2015
)
等。现在创建此阵后,我把它像
and so on. Now after creating this array, I send it like
$.post('php/_includes/_ajaxIncludes/ajax.inc.container.php',
{
section: 'save',
data: myArray
});
我称之为 ajax.inc.container.php
并在该文件包括我一个名为 save.php
。我可以通过改变部分参数切换INC文件。
I call ajax.inc.container.php
and in that file I include a file named save.php
. I can switch the inc-file by changing the section-parameter.
现在,这里是问题:
创建的阵列,例如。 40个位置(甚至更多)的冠词
(我做了的console.log(myarray的);
权利之前 $交),但如果我的print_r($ _ POST ['数据'] ['冠词']);
在PHP中,我只得到31的位置和最后的位置不连完成。貌似
The created array has eg. 40 positions (or even more) in artikel
(I did console.log(myArray);
right before $.post
) but if I print_r($_POST['data']['artikel']);
in php, I only get 31 positions and the last position isn't even completed. Looks like
[31] => Array
(
[id] => 602147-69430
[name] => Leblock 1 Blouse
[farbe] => Cashmere Blue mix
[menge] => 0
[epreis] => 35.95
[gpreis] => 0.00
[uvp] => 89.90
)
有谁知道为什么会发生这种情况?
anyone know why this can happen ?
其他信息:
的post_max_size 64M
post_max_size 64M
修改
显然未能来自jQuery的。
Obviously the failure comes from jquery.
如果我加入 .done()
和 .fail()
到 $。后()
并返回响应的console.log(响应);
他进入失败()。
If I add .done()
and .fail()
to $.post()
and return the response console.log(response);
he goes into fail()
if there are more than 30 positions.
所以,你只能得到31完整的数组元素和第32元素只有7项。 每个元素都有32个项目。
So you receive only 31 complete array elements and the 32nd element has only 7 items. Each element has 32 items.
31×32 = 992
31 x 32 = 992
992 + 7 = 999
992 + 7 = 999
默认为max_input_vars是1000。 也许我错过了......
The default for max_input_vars is 1000. Maybe I missed one...
尝试max_input_vars提高到2000,看看有什么变化。
Try increasing max_input_vars to 2000 and see if anything changes.