register_globals
该选项是PHP用来注册全局变量的,如果off,$_GET,$_POST等访问时则需要这样,例如$_GET['fujieace'];这样可以增加它的安全性;
经过博主查看PHP官网发现:php.net给出了这段提示:
register_globals boolean
Whether or not to register the EGPCS (Environment, GET, POST, Cookie, Server) variables as global variables.As of » PHP 4.2.0, this directive defaults to off.
Please read the security chapter on Using register_globals for related information.Please note that register_globals cannot be set at runtime (ini_set()). Although, you can use .htaccess if your host allows it as described above. An example .htaccess entry: php_flag register_globals off.
Note:
register_globals is affected by the variables_order directive.Warning
本特性已自 PHP 5.3.0 起废弃并将自 PHP 5.4.0 起移除。
由此可见:
此选项已经被PHP 5.3.0 起废弃并将自 PHP 5.4.0 起移除;因此没有也是很正常的!
php官网给出的链接如下:
http://php.net/manual/zh/ini.core.php#ini.register-globals
关于在php5.4以后的版本如何禁止全局变量,目前php.ini配置文件参数也没有一个说法,博主目前也不知道,如果博主知道了,会第一时间更新到此篇文章!请大家敬请关注!
2020年02月23日 22:44:50 沙发
学习php
2020年02月24日 11:06:40 1层
@111 百度网盘共享链接:https://pan.baidu.com/s/4eUPK354