php 过滤csv敏感词 上代码
function getcsv($content=''){
$csv_file='精确词1.csv';
//读取文件
$file=file_get_contents($csv_file);
$arr = explode("\r\n",$file);
foreach($arr as $k=>$v){
if($v){
if(strpos($content,trim($v))!==false){
return '敏感字';
}
}
}
return '没有敏感字';
}