使用ini_set设置max_input_vars PHP.ini指令 [英] setting max_input_vars PHP.ini directive using ini_set

查看:797
本文介绍了使用ini_set设置max_input_vars PHP.ini指令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在代码中设置max_input_vars PHP.ini指令吗?我将其设置为默认值1000,但是我有一个脚本,其中包含许多复选框和文本字段,这些复选框和文本字段有可能超过1000个限制.

Can I set the max_input_vars PHP.ini directive in my code? I have it set at the default 1000, however I have a script that has many checkboxes and text fields that could, and quite possibly will, go over the 1000 limit.

我正在使用PHP 5.3.10,并且这样做没有任何错误.另外,我找不到任何说明我无法做到这一点的文档.

I'm using PHP 5.3.10 and i'm not getting any errors doing this. Also, I can't find any documentation that states I can't do this.

ini_set('max_input_vars', 3000);

谢谢.

推荐答案

max_input_vars 具有 PHP_INI_PERDIR 的可更改模式,这意味着无法使用(仅适用于php.ini,.htaccess或httpd.conf)

max_input_vars has a changeable mode of PHP_INI_PERDIR meaning it can't be changed using ini_set (only in php.ini, .htaccess or httpd.conf)

这篇关于使用ini_set设置max_input_vars PHP.ini指令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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