首页 > 开发 > Php > 正文

php提示Deprecated: Directive 'register_globals' is deprecated in PHP 5.3

2020-06-09 12:33:27
字体:
来源:转载
供稿:网友

代码事下:

  1. I:/>cd www 
  2.  
  3. I:/www>php a.php 
  4. PHP Deprecated:  Directive 'register_globals' is deprecated in PHP 5.3 and great 
  5. er in Unknown on line 0 
  6.  
  7. Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in 
  8.  Unknown on line 0 
  9.  
  10. /*================================================= 
  11. ====Name:dedecms 5.7 getshell                  ==== 
  12. =================================================== 
  13. ====Usage:php  dede.php      ==== 
  14. =================================================== 
  15. ====Team:C0dePlay  Team      ==== 
  16. =================================================== 
  17. ====Author: Yaseng           ==== 
  18. ====Date: 2012-06-15 01:35:00                  ==== 
  19. ===================================================*/ 
  20.  
  21. I:/www> 

原因分析:

PHP 5.3 开始,配置文件 php.ini 中的一些配置将会在 PHP 执行时显示过时警告,这些配置将在 PHP6中不再存在,相关功能也将关闭。

  1. define_syslog_variables 
  2. register_globals 
  3. register_long_arrays 
  4. safe_mode 
  5. magic_quotes_gpc 
  6. magic_quotes_runtime 
  7. magic_quotes_sybase 

解决问题很简单

只需要在php.ini中,做如下的设置即可。

register_globals = Off

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表