2012-03-21 143 views
22

我有一個非常大的形式,> 1000元素。它們已經嵌套在表格html結構中

   {foreach from=$result item=item} 
        <tr> 
         <td><input type="text" value="{$item.receiver.name}" name="item[{$item.id}][receiver][name]" /></td> 
         <td><input type="text" value="{$item.receiver.account_number}" name="item[{$item.id}][receiver][account_number]" /></td> 
         <td><input type="text" value="{$item.receiver.bank_code}" name="item[{$item.id}][receiver][bank_code]" /></td> 
         <td><input type="text" value="{$item.amount}" name="item[{$item.id}][amount]" /></td> 
         <td><input type="text" value="{$item.usage.first}" name="item[{$item.id}][usage][first]" /></td> 
         <td><input type="text" value="{$item.usage.second}" name="item[{$item.id}][usage][second]" /></td> 
         <td><input type="text" value="Yourdelivery GmbH" name="item[{$item.id}][usage][third]" /></td> 
         <td> 
          <input type="checkbox" value="1" name="item[{$item.id}][import]" /> 
         </td> 
        </tr> 
       {/foreach} 

它是爲海量銀行交易創建一個DATAUS文件。但是,在達到1000行以上之後,沒有更多元素被添加到$ _POST數組中,並且調試器顯示以下元素數量。

Xdebug Output

我已經加入到max_post_size 100M進行測試,但沒有任何幫助。

+1

你有沒有在這臺服務器上安裝Suhosin?運行'php -i |在命令行找到grep -i'Suhosin''。參見['suhosin.post.max_vars'](http://www.hardened-php.net/suhosin/configuration.html#suhosin.post.max_vars)和['suhosin.post.max_array_index_length'](suhosin.post。 max_array_index_length)。 – Treffynnon 2012-03-21 14:57:20

+0

[此建議](http://www.php.net/manual/en/ini.core.php#101755)有幫助嗎? – Ryan 2012-03-21 14:57:36

+0

有類似的問題,當我不得不模擬一個MYSQL控制檯...我使用$ _SESSION變量,我可以通過長串(超過1k行)沒有問題。 – 2012-03-21 15:01:08

回答

38

嘗試更改max_input_vars以及。更多信息:PHP max_input_vars and big forms

+1

鏈接到更多信息是有幫助的並且解決了我的問題。一個小技巧:在OS X Mountain Lion php.ini文件位置是**/private/etc/php.ini **。我發現使用** php --ini **命令。 – csonuryilmaz 2013-05-06 15:10:57