过滤字符串考虑'和\就可以了
return get_magic_quotes_gpc()==1?$string:addslashes($string);