SQL注入:mysqli_real_escape_string()转义关键字符; XSS攻击:alert把一些cookie信息打印出来;过滤掉<>等关键字符串 CSRF攻击:跨站攻击。防止:token,验证码