index.php添加下面代码
$chkstr=$_SERVER['REQUEST_URI'];
if(stristr($chkstr,'"')!="" || stristr($chkstr,"'")!="" || stristr($chkstr,'<')!="" || stristr($chkstr,'>')!="" || stristr($chkstr,'%22')!="" || stristr($chkstr,'%27')!="" || stristr($chkstr,'%3C')!="" || stristr($chkstr,'%3E')!="" || stristr($chkstr,'(')!="" || stristr($chkstr,')')!="" || stristr($chkstr,'`')!="" || stristr($chkstr,'%28')!="" || stristr($chkstr,'%29')!="")
{
die('<meta charset="utf-8" />Please do not enter illegal characters!<a href="/" style="color:#238ada">Homepage</a>');
}