ucenter中magic_quotes_gpc作用

2008年10月9日 | 14:12分类:网页设计 | 标签: | 73 views

安装最新的ecshop,需要先安装ucenter,装完后,进入 UCenterAdministrator后台,在首页的服务器环境里有个

Magic_quote_gpc:Off

与其他的中文说明格格不入,不太理解,搜索了一下官方的论坛,发现大概是这个意思

get_magic_quote_gpc() 魔术引用
它会把通过 GET,POST 或者 cookie 提交给 PHP 应用程序的变量都加上斜杠。

设置ON 安全点!
magic_quota_gpc()实际上就是把http输入的字符用addslashes处理一遍
官方的说明

- magic_quotes_gpc = Off [Performance]
; Input data is no longer escaped with slashes so that it can be sent into
; SQL databases without further manipulation. Instead, you should use the
; function addslashes() on each input element you

如果需要设置,进入系统修改/etc/php.ini文件,把

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

修改为

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = On

然后重启apache

# apachectl restart

发表您的评论

您的名字: (*必填)

您的邮箱: (*不会被公布 ,必填)

您的网站:

*
To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
Click to hear an audio file of the anti-spam word