当前位置:首页 > PHP教程 > php高级应用 > 列表

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

发布:smiling 来源: PHP粉丝网  添加日期:2018-10-26 09:48:14 浏览: 评论:0 

代码事下:

  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

Tags: Deprecated Directive register_globals

分享到: