最新消息: 新版网站上线了!!!

php sql引入防注入sql的方法

foreach($_GET as $key=>$value){
    StopAttack($key,$value,$getfilter);
}
foreach($_POST as $key=>$value){
    StopAttack($key,$value,$postfilter);
}
foreach($_COOKIE as $key=>$value){
    StopAttack($key,$value,$cookiefilter);
}
function slog($logs)
{
    $toppath=$_SERVER["DOCUMENT_ROOT"]."/log.htm";
    $Ts=fopen($toppath,"a+");
    fputs($Ts,$logs."\r\n");
    fclose($Ts);

转载请注明:谷谷点程序 » php sql引入防注入sql的方法