2017-9-8 0
function have_badword($title){ $badword = ['关键字1','关键字2','类推']; foreach($badword as $v) { if(strpos($title, $v) !== FALSE) { return $v; } } return ''; } 调用 if(have_badword(传入文章标题))echo '存在敏感词'; else echo '正常';
加载更多