HTML或PHP中POST参数的限制 [英] Limit of POST arguments in html or php

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

问题描述

是否有任何限制的POST参数?我有情况,在开发服务器我的形式超过520个参数发布和保存没有问题,在生产环境,它只能节省多达499个参数...



任何想法?

解决方案

我不认为通过发送的变量的数量是有限制的POST,只是在他们累积的大小上。这个限制因服务器而异。


更新: Suhosin PHP强化补丁 实际上可能会限制请求变量的数量。缺省值是200. Suhosin默认安装在Ubuntu上,所以它可能是你的问题的原因。信息由@Pascal Martin提供,欢呼!


限制POST最大尺寸有两个因素:



您可以使用 phpinfo()

找到它的值,并且Web服务器的限制为:





在您的特定情况下,您可能希望添加什么样的服务你正在运行这个,数据有多大。 520参数是否在 post_max_size 附近?如果您在接收脚本中执行 print_r($ _ REQUEST),会发生什么?


is there any limit of POST arguments? I have situation where on dev server my form with over 520 args is posted and saved without problems, where on production env it saves only up to 499 args...

Any ideas?

解决方案

I don't think there is a limit to the number of variables sent through POST, just on their accumulated size. The limit varies from server to server.

Update: The Suhosin PHP hardening patch can in fact impose a limit on the number of request variables. The default is 200. Suhosin is installed by default on Ubuntu, so it could be the reason for your problem. Info courtesy of @Pascal Martin, cheers!

There are two factors to limiting the POST maximum size:

You can find out its value using phpinfo().

And the web server's limits:

In your specific case, you may want to add what kind of server you are running this on, and how big the data is. Are the 520 arguments coming anywhere near post_max_size? What happens if you do a print_r($_REQUEST) in the receiving script?

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

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