2015-09-23 35 views
3

我在我的表格輸入中發佈很多行數據時有問題,我只看到500行。發佈數組限制?

這裏我的詳細信息代碼:

<?php 
if($_POST){ 
echo '<pre>'; 
print_r($_POST); 
echo '</pre>'; 
} 
?> 

<form method="post" enctype="multipart/form-data" > 
    <table> 
     <tr> 
      <td>Value</td> 
      <td>Name</td> 
     </tr> 
    <?php for($i=1;$i<=1000;$i++){?> 
     <tr> 
      <td><input type="input" name="attributes[<?= $i ?>][value]" value="<?= $i ?>" /></td> 
      <td><input type="input" name="attributes[<?= $i ?>][name]" value="<?= 'name'. $i ?>" /></td> 
     </tr> 
    <?php } ?> 

    </table> 
<input type="submit"/> 
</form> 

回答

6

PHP引入了max_input_vars配置選項,該選項默認爲1000時退房PHP手冊運行時配置部分的價值。

可以通過更新服務器的php.ini,添加.htaccess文件或向httpd.conf添加一行來更改該值。