php.ini配置文件 register_globals = on/off 找不到解决办法

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 起移除。

register_globals = on找不到

由此可见:

此选项已经被PHP 5.3.0 起废弃并将自 PHP 5.4.0 起移除;因此没有也是很正常的!

php官网给出的链接如下:

http://php.net/manual/zh/ini.core.php#ini.register-globals

 

关于在php5.4以后的版本如何禁止全局变量,目前php.ini配置文件参数也没有一个说法,博主目前也不知道,如果博主知道了,会第一时间更新到此篇文章!请大家敬请关注!

 

    A+
发布日期:2017年01月06日 19:34:34  所属分类:PHP问答
最后更新时间:2020-06-12 10:39:54
付杰
  • ¥ 59.8元
  • 市场价:99.8元
  • ¥ 159.0元
  • 市场价:599.0元
  • ¥ 149.0元
  • 市场价:299.0元
  • ¥ 68.0元
  • 市场价:128.0元

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:2   其中:访客  0   博主  0

  1. 头像 111 1

    学习php

    • 付杰 付杰

      @111 百度网盘共享链接:https://pan.baidu.com/s/4eUPK354