数据载入中......
公告 |
| 数据载入中...... |

|
|
| |
|
[SQL教程] asp过滤不文明字符的函数 |
| 开开心心 发表于:2008-8-21 17:05:18 |
经常在一些大型的论坛上看到一些带有不文明字符的贴子,这些不文明字符被自动替换成***。这里这个函数用来实现这样的功能的,这里这些不文件的字符可以从数据库中读取,这样就可以实现添加这些数据了 <% Function cutbadchar(str) badstr="不|文|明|字|符|列|表|格|式" badword=split(badstr,"|") For i=0 to Ubound(badword) If instr(str,badword(i)) > 0 then str=Replace(str,badword(i),"***") End If Next cutbadchar=str End Function %> |
|
|
数据载入中......
|