php的敏感词的过滤类.zip

时间:2022-07-31 03:38:02
【文件属性】:
文件名称:php的敏感词的过滤类.zip
文件大小:2KB
文件格式:ZIP
更新时间:2022-07-31 03:38:02
类库下载-php的敏感词的过滤类 <?php class Logic_BlackWord {   const APP_FORUM = 1;   const APP_BLOG  = 2;   const APP_VOTE  = 3;   public function getHitList($txt)   {     $hitList = array();     //对禁词分批过滤     $max = $this->getMax();     if($max)     {       $size = 1000;       $last = ceil($max/$size);       for($page=1;$page<=$last;$page )       {         $result = $this->getHitListByPage($txt,$page,$size);         if($result) $hitList = array_merge($hitList,$result);       }     }主要使用了  int substr_count ( string haystack, string needle [, int offset [, int length]] )  这个方法,这个方法遍历待测的字符串$str中有没有$allergicWord数组中所包含的敏感词: 
【文件预览】:
php的敏感词的过滤类
----php中文网下载站.url(114B)
----php的敏感词的过滤类.php(4KB)
----php中文网免费下载站.txt(219B)

网友评论