PHP防止DOM注入脚本,过滤文本中的SCRIPT标签
public function scriptReplace($string){
$preg = "/<script[sS]*?</script>/i";
return preg_replace($preg,"",$string,-1);
}
public function scriptReplace($string){
$preg = "/<script[sS]*?</script>/i";
return preg_replace($preg,"",$string,-1);
}