PHP失去了表单POST参数 [英] php loses form POST parameters

查看:145
本文介绍了PHP失去了表单POST参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用POST方法发送数据的表单,大约需要在MySQL中插入3000个数组键,如下所示:

  client_add [] = 1 
client_add [] = 3
client_add [] = 47
...

问题在于我的本地主机在开发服务器上工作得很好。在生产中,我只获得大约1000行,在localhot上它似乎迷路了,我们遇到了php.ini文件,开发服务器的一切都设置为比我的本地主机更多的内存。



我的想法已经用完了。 解决方案

PHP有一个ini设置,它决定了POST请求的大小,你可以在 post_max_size 的名字下找到它。

另外,如果你有 Suhosin 补丁安装后,它会强制限制您可以在每个请求上提交的POST变量的数量。我认为这是默认的2000左右。


I have a form which sends data with the POST method, about 3000 array keys to be inserted in MySQL like this:

client_add[]=1
client_add[]=3
client_add[]=47
...

The problem is on my localhost on the development server works just fine. On production I only get about 1000 rows, on the localhot it seems to get lost, we confronted the php.ini files and the development server has everything set to more memory than my localhost.

I've run out of ideas.

解决方案

PHP has an ini setting which dictates the size of your POST request, you can probably find it in your ini under the name of post_max_size.

Also, if you've got the Suhosin patch installed it will enforce a limit on the number of POST variables you can submit on each request. I think this is around 2000 by default.

这篇关于PHP失去了表单POST参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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