浏览代码

敏感词过滤报错

sugar1569 7 年之前
父节点
当前提交
2ec4818d21
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      application/common.php

+ 1 - 1
application/common.php

@@ -24,7 +24,7 @@ function sensitive_words_filter($str)
     $words = file($file);
     $words = file($file);
     foreach($words as $word)
     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;
         if (!$word) continue;
 
 
         $ret = preg_match("/$word/", $str, $match);
         $ret = preg_match("/$word/", $str, $match);