我知道max_input_vars的php.ini值默认为1000(我使用的是5.6版本).我的POST数据被截断,所以我需要增加值.这确实解决了我的问题.在更改这些值时,我只想了解它实际上具体影响了什么.
如果我向我的后端发送一组数据,这是否意味着它只能包含大约1000个元素?看起来我的表单总和不是1000个输入字段,所以我想弄清楚这个数字的用途.
我能去的安全高数是多少? 10000会被认为太高吗?
解决方法:
基本上这就是我们所谓的“理智检查”.它将请求限制在合理的水平,以防止诸如拒绝服务攻击之类的事情.
How many input variables may be accepted (limit is applied to $_GET, $_POST and $_COOKIE superglobal separately). Use of this directive mitigates the possibility of denial of service attacks which use hash collisions. If there are more input variables than specified by this directive, an E_WARNING is issued, and further input variables are truncated from the request.
简而言之,将其提升到你需要的任何东西,并记住这使你更容易受到可能使服务器陷入困境的攻击.本身没有“安全”号码.只是不要重载您的服务器或您的PHP请求可能会开始超时或内存不足.
标签:apache,php,http-post
来源: https://codeday.me/bug/20190627/1308249.html