请问含有敏感内容的词汇有哪些?
- 内容介绍
- 文章标签
- 相关推荐
本文共计245个文字,预计阅读时间需要1分钟。
这是对伪原创内容的简化
这个代码是从别人那里复制来的,不是原创,只是实现了一个功能,逻辑与原代码非常相似。 [代码] [PHP] 代码 这个是摘自别人的代码哦,非原创,只是刚好做到一个功能,逻辑与这个代码非常相似
1.[代码][PHP]代码
<?php /** * 敏感词汇过滤 * User: konakona * Date: 12-11-28 * Time: 下午4:37 * 调用方式 * if(false === SensitiveFilter::filter($content)){ * error("含有敏感词汇"); * } */ class SensitiveFilter extends Think{ public static $wordArr = array(); public static $content = ""; /** * 处理内容 * @param $content * * @return bool */ public static function filter($content){ if($content=="") return false; self::$content = $content; empty(self::$wordArr)?self::getWord():""; foreach ( self::$wordArr as $row){ if (false !== strstr(self::$content,$row)) return false; } return true; } public static function getWord(){ self::$wordArr = include 'SensitiveThesaurus.php'; } }
2.[文件] SensitiveThesaurus.php~21KB 下载(76)
本文共计245个文字,预计阅读时间需要1分钟。
这是对伪原创内容的简化
这个代码是从别人那里复制来的,不是原创,只是实现了一个功能,逻辑与原代码非常相似。 [代码] [PHP] 代码 这个是摘自别人的代码哦,非原创,只是刚好做到一个功能,逻辑与这个代码非常相似
1.[代码][PHP]代码
<?php /** * 敏感词汇过滤 * User: konakona * Date: 12-11-28 * Time: 下午4:37 * 调用方式 * if(false === SensitiveFilter::filter($content)){ * error("含有敏感词汇"); * } */ class SensitiveFilter extends Think{ public static $wordArr = array(); public static $content = ""; /** * 处理内容 * @param $content * * @return bool */ public static function filter($content){ if($content=="") return false; self::$content = $content; empty(self::$wordArr)?self::getWord():""; foreach ( self::$wordArr as $row){ if (false !== strstr(self::$content,$row)) return false; } return true; } public static function getWord(){ self::$wordArr = include 'SensitiveThesaurus.php'; } }

