Home  >  Article  >  Backend Development  >  敏感字段过滤程序解决方法

敏感字段过滤程序解决方法

WBOY
WBOYOriginal
2016-06-13 10:01:261087browse

敏感字段过滤程序
我想做个系统,在录入数据里想对有些字段进行过滤,谁有代码,发一下,谢谢。

------解决方案--------------------
聲明一個
明港字: 
$healthy = array("fuck","fuck","操");
//獲得客戶輸入:
$test="asdffuckasdf我操shit..";
$tihuan=str_replace($healthy,"***",$test);
echo $tihuan;
------解决方案--------------------
就是一个简单的关键字替换

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn