//表单提交字符转义 static public function setFormString($_string) { if (!get_magic_quotes_gpc()) { if (Validate::isArray($_string)) { foreach ($_string as $_key=>$_value) { $_string[$_key] = self::setFormString($_value); //不支持就用代替addslashes(); } } else { return addslashes($_string); //mysql_real_escape_string($_string, $_link); } } return $_string; }