我有一个使用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参数
发布评论