SQL防注入代码
时间:2008-05-19 来源:youkuiyuan
原文在
http://www.phpchina.com/html/13/37313_itemid_32944.html
if (!function_exists (quote))
{
function quote($var)
{
if (strlen($var))
{
$var=!get_magic_quotes_gpc() ? $var : stripslashes($var);
$var = str_replace("'","\'",$var);
}
return "'$var'";
}
}
相关阅读 更多 +