您好,欢迎访问一九零五行业门户网

PHP get_magic_quotes_gpc 函数

get_magic_quotes_gpc
取得 php 环境变数 magic_quotes_gpc 的值。
语法: long get_magic_quotes_gpc(void);
传回值: 长整数。
函式种类: php 系统功能
 内容说明:
本函式取得 php 环境设定的变数 magic_quotes_gpc (gpc, get/post/cookie) 值。传回 0 表示关闭本功能;传回 1 表示本功能开启。当 magic_quotes_gpc 开启时,所有的 ' (单引号), (双引号), \ (反斜线) and 空字符会自动转为含有反斜线的溢出字符。
例:
function html($str)
{
     $str = get_magic_quotes_gpc()?$str:addslashes($str);
     return $str;
}
其它类似信息

推荐信息