最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php get_magic_quotes_gpc 函数
时间:2022-07-02 09:56:17 编辑:袖梨 来源:一聚教程网
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
相关文章
- 我的御剑日记第九章祭坛怎么过 05-09
- 《哈迪斯2》羊毛材料获取方法 05-09
- 《夜族崛起》恶魔城ps5介绍 05-09
- 《夜族崛起》pvp加入方法 05-09
- 《庄园领主》民兵装备介绍 05-09
- 《夜族崛起》蚕获得方法 05-09