熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

asp 非法關鍵詞過濾程序

2013-11-13 10:41:09  來源: .NET編程 

  非法關鍵詞過濾程序

  Public Function FilterBadWord(str)
  If str = "" Or IsNull(str) Then
   FilterBadWord = ""
   Exit Function
  End If
  Dim ibadWordSplitfilterSplit
  badWordSplit = Split(CfgbadWordFilter"|")
  For i = To UBound(badWordSplit)
   filterSplit = Split(badWordSplit(i)"")
   If InStr(strfilterSplit()) Then str = Replace(strfilterSplit()filterSplit())
  Next
  FilterBadWord = str
 End Function

  使用方法
dim stra
stra = FilterBadWord(requestForm(fom))


From:http://tw.wingwit.com/Article/program/net/201311/14293.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.