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

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

WBOY
Release: 2016-06-13 10:01:26
Original
1105 people have browsed it

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

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template