Home > Backend Development > PHP Tutorial > PHP Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3

PHP Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3

WBOY
Release: 2016-06-20 13:03:30
Original
1780 people have browsed it

PHP Deprecated:  Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0

从PHP 5.3 开始,为了更好的向 PHP 的未来版本(PHP6) 过渡,将未来不再支持的函数标记为 DEPRECATED。在代码中使用这些函数,将毫不留情的在页面中显示警告信息:“使用了过时的函数…”,诸如此类。

那么如何面向未来,让现有的 PHP 程序平滑的向下一代 PHP 引擎过渡呢?
配置文件迁移
PHP 5.3 开始,配置文件 php.ini 中的一些配置将会在 PHP 执行时显示过时警告,这些配置将在 PHP6中不再存在,相关功能也将关闭。define_syslog_variables
register_globals
register_long_arrays
safe_mode
magic_quotes_gpc
magic_quotes_runtime
magic_quotes_sybase

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

magic_quotes_gpc = Off


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template