- <%
- '******************************
- '函数:CheckQuery(ByVal str)
- '参数:str ----搜索的字符串
- '作者:阿里西西
- '日期:2007/7/15
- '描述:限制搜索的关键字
- '示例:CheckQuery(str)
- '******************************
- Public Function CheckQuery(ByVal str)
- Dim FobWords, i, keyword
- keyword = str
- On Error Resume Next
- FobWords = Array(91, 92, 304, 305, 430, 431, 437, 438, 12460, 12461, 12462, 12463, 12464, 12465, 12466, 12467, 12468, 12469, 12470, 12471, 12472, 12473, 12474, 12475, 12476, 12477, 12478, 12479, 12480, 12481, 12482, 12483, 12485, 12486, 12487, 12488, 12489, 12490, 12496, 12497, 12498, 12499, 12500, 12501, 12502, 12503, 12504, 12505, 12506, 12507, 12508, 12509, 12510, 12532, 12533, 65339, 65340)
- For i = 1 To UBound(FobWords, 1)
- If InStr(keyword, ChrW(FobWords(i))) > 0 Then
- CheckQuery = False
- Exit Function
- End If
- Next
- FobWords = Array("~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "+", "=", "`", "[", "]", "{", "}", ";", ":", """", "'", "<", ">", ".", "/", "\", "|", "?", "about", "after", "all", "also", "an", "and", "another", "any", "are", "as", "at", "be", "because", "been", "before", "being", "between", "both", "but", "by", "came", "can", "come", "could", "did", "do", "each", "for", "from", "get", "got", "had", "has", "have", "he", "her", "here", "him", "himself", "his", "how", "if", "in", "into", "is", "it", "like", "make", "many", "me", "might", "more", "most", "much", "must", "my", "never", "now", "of", "on", "only", "or", "other", "our", "out", "over", "said", "same", "see", "should", "since", "some", "still", "such", "take", "than", "that", "the", "their", "them", "then", "there", "these", "they", "this")
- keyword = Left(keyword, 100)
- keyword = Replace(keyword, "!", " ")
- keyword = Replace(keyword, "]", " ")
- keyword = Replace(keyword, "[", " ")
- keyword = Replace(keyword, ")", " ")
- keyword = Replace(keyword, "(", " ")
- keyword = Replace(keyword, " ", " ")
- keyword = Replace(keyword, "-", " ")
- keyword = Replace(keyword, "/", " ")
- keyword = Replace(keyword, "+", " ")
- keyword = Replace(keyword, "=", " ")
- keyword = Replace(keyword, ",", " ")
- keyword = Replace(keyword, "'", " ")
- For i = 0 To UBound(FobWords, 1)
- If keyword = FobWords(i) Then
- CheckQuery = False
- Exit Function
- End If
- Next
- CheckQuery = True
- End Function
- %>
asp实现限制搜索的关键字的函数
2019-10-11 10:42asp代码网 ASP教程
asp实现限制搜索的关键字的函数
延伸 · 阅读
- 2019-10-11asp实现过滤关键字的函数
- 2019-10-11彻底掌握ASP分页技术杂谈
- 2019-10-11asp动态include文件,方便多模板的实现
- 2019-10-11推荐的用Asp实现屏蔽IP地址访问的代码
- 2019-10-11XDOWNPAGE ASP版本 分页类
- 2019-10-11ASP下Cookie操作的详细讲解
精彩推荐
- ASP教程
asp终极防范SQL注入漏洞
其实SQL注入漏洞并不可怕,知道原理 + 耐心仔细,就可以彻底防范!...
- ASP教程
javascript css实现三级目录(简单的)
本篇文章主要介绍了javascript css实现三级目录(简单的),这是一款不错的CSS树形菜单,树状列表,当然不全是CSS实现,部分功能还使用了JavaScript代码进行配...
- ASP教程
asp是什么格式 asp文件用什么打开
今天在群里有人问asp是什么格式 asp文件用什么打开,其实asp就是微软的后台语言,很多网站都是用asp做的网站,虽然现在php用的更多,这里简单的介绍下...
- ASP教程
asp教程中get post提交表单有5点区别
asp教程中get post提交表单有5点区别分别以HTTP请求,表单两者分别介绍,需要的朋友可以了解下...
- ASP教程
asp读取excel表名的实现代码
excel在实际中,还有大量应用,今天就拿到一堆的excel文件,需要对里面的数据做下读取另作他用,这里就涉及到了asp遍历excel的所有表名。...
- ASP教程
ASP UTF-8编码生成静态网页的函数
按照“FSO生成的网页文件默认编码格式以及转换成UTF-8编码方法”,编写函数采用用Adodb.Stream对象,成功生成UTF-8网页文件。...
- ASP教程
asp代理采集的核心函数代码
如果你不会写asp采集,那么代码你可能不懂,那就不是我这次发帖所讨论了,希望对大家有用。 ...
- ASP教程
asp提示Server 对象 错误 ASP 0178 : 80070005
今天帮客户配置好服务器以后测试程序发现asp程序提示Server 对象 错误 ASP 0178 : 80070005,经测试是因为权限问题。...