如何在PHP中增加最大POST变量? [英] How to increase maximum POST variable in PHP?

查看:58
本文介绍了如何在PHP中增加最大POST变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地计算机上使用WAMP,当提交具有2000个输入字段的FORM(method ="POST")时,我只能读取1001 _POST变量.即使用Netbeans调试器,如果表单中的输入字段超过1001,我可以清楚地看到_POST大小始终为1001.

I'm using WAMP in my local machine, when a FORM(method="POST") with 2000 input fields is submitted I'm able to read only 1001 _POST variable. i.e With Netbeans debugger I can clearly see _POST size is always 1001 if there are more than 1001 input fields in the form.

我使用此 http://ideone.com/GAw14 Java代码生成具有N个输入字段的表单,并且经过测试.

I used this http://ideone.com/GAw14 java code to generate form with N input fields and tested.

在另一台机器(WAMP)上也可以正常工作,在这里我可以看到所有POST变量.

The same is working fine in another machine(WAMP), where I can see all the POST variables.

请帮助我解决问题.

推荐答案

PHP 5.3.9引入了max_input_vars config选项,默认值为1000.请查看

PHP 5.3.9 introduced the max_input_vars config option, which is defaulted to a value of 1000. Check out the Runtime Configuration section of the PHP manual. The default value and the change log are at the top of the page.

可以通过更新服务器的php.ini,添加.htaccess文件或在httpd.conf 中添加一行.

The value can be changed by updating the server's php.ini, adding an .htaccess file, or adding a line to httpd.conf.

这篇关于如何在PHP中增加最大POST变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆