get_magic_quotes_gpc 
( PHP 4中, PHP 5中) 
get_magic_quotes_gpc -获取当前的配置设置的魔术引号胆碱 
描述 
国际get_magic_quotes_gpc (无效) 
返回当前的magic_quotes_gpc的配置设置 
请记住,设置magic_quotes_gpc的工作将不会在运行时。 
欲了解更多有关magic_quotes ,请参阅此安全一节。 
返回值 
返回0 ,如果魔术引号胆碱是关闭, 1除外。 
实例 
例如# 1 get_magic_quotes_gpc ( )的例子 
“ ?的PHP 
回声get_magic_quotes_gpc ( ) ; / / 1 
回声的$ _POST [ '姓' ] ; / /输出 ' Reilly的 
回声和addslashes (的$ _POST [ '姓' ] ) ; / /输出   ' Reilly的 
如果( ! get_magic_quotes_gpc ( ) ) ( 
     $姓=和addslashes (的$ _POST [ '姓' ] ) ; 
其他( ) 
     $姓=的$ _POST [ '姓' ] ; 
) 
回声$姓; / /输出 ' Reilly的 
$的SQL = “插入lastnames (姓)值( ' $姓' ) ” ; 
? “ 
注 
注意:如果该指令magic_quotes_sybase是对它将完全覆盖magic_quotes_gpc的。因此,即使get_magic_quotes_gpc ( )返回TRUE没有双引号,反斜线或对任何的将逃脱。只有单引号将逃脱。在这种情况下,他们会像: ''
addslashes() - 引用字符串斜线
stripslashes() - 取消addslashes代码
get_magic_quotes_runtime() - 
ini_get() - Gets