function guolv($data){
$mgc=array("哈哈","哦");
for ($i=0; $i <count($mgc) ; $i++) {
$data=str_replace($mgc[i], “*”, $data);
}
return $data;
}
写了个过滤敏感词的函数,不起作用,求教。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
这个情况可能这么写更加简单