我已经做了一个简单的功能,以防止从sql注入和XXS 这里是我的代码,对此的任何建议?这对于安全性来说足够好吗?PHP安全功能
function mres($input){
if(get_magic_quotes_gpc()){
$input=stripslashes($input);
}
$input=htmlentities($input, ENT_COMPAT, 'UTF-8');
return mysql_real_escape_string($input);
}
http://stackoverflow.com/q/4223980/285587 –