有些php自带sql过滤有些没有开启sql过滤,
get_magic_quotes_gpc()是判断sql过滤是否开启
static public function
mysqlString($_date){
$GPC=
get_magic_quotes_gpc();
if
(!$GPC){
return
mysql_real_escape_string($_date);
}
else
{
return
$_date;
}
}