敏感词过滤报错

This commit is contained in:
sugar1569 2018-11-05 17:52:24 +08:00
parent dbdf71ba39
commit 2ec4818d21

View File

@ -24,7 +24,7 @@ function sensitive_words_filter($str)
$words = file($file);
foreach($words as $word)
{
$word = str_replace(array("\r\n","\r","\n"," "), '', $word);
$word = str_replace(array("\r\n","\r","\n","/","<",">","="," "), '', $word);
if (!$word) continue;
$ret = preg_match("/$word/", $str, $match);