最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
非法字符过滤函数
时间:2022-06-30 09:14:55 编辑:袖梨 来源:一聚教程网
Function ChkStr(InString) '非法字符过滤函数
If InString<>"" Then
InString=Replace(LCase(InString)," ","")
InString=Replace(LCase(InString),";","")
InString=Replace(LCase(InString),"'","")
InString=Replace(LCase(Instring),"--","")
Instring=Replace(LCase(Instring),"%","")
InString=Replace(LCase(InString),"%20","")
InString=Replace(LCase(InString),"admin","")
InString=Replace(LCase(InString),"and","")
InString=Replace(LCase(InString),"or","")
InString=Replace(LCase(InString),"asc","")
InString=Replace(LCase(Instring),"chr","")
InString=Replace(LCase(InString),"mid","")
InString=Replace(LCase(InString),"len","")
InString=Replace(LCase(InString),"select","")
InString=Replace(LCase(InString),"insert","")
InString=Replace(LCase(InString),"delete","")
InString=Replace(LCase(InString),"update","")
ChkStr=InString
End If
End Function
Function CheckFileExt(FileExt) '检测文件扩展名
Dim FileAccessExt,AccessExt
AccessExt="gif,jpg,jpeg,bmp,doc,txt,png"
FileAccessExt=Split(AccessExt,",")
For i=LBound(FileAccessExt) to UBound(FileAccessExt)
If LCase(FileExt)=LCase(FileAccessExt(i)) Then
CheckFileExt=True
Else
CheckFileExt=False
End If
Next
End Function
Function CheckStr(str,IsStr) '检查非法字符和数字数据
CheckStr=str
If IsStr And InStr(str,",")>0 Then
Call errmsg("提交字符中包含非法字符")
ElseIf (Not IsStr) And (Not IsNumeric(str)) Then
Call errmsg("提交不是数字型")
End If
End Function
Sub errmsg(str)
If Not IsNull(str) Then
Response.Write(str)&"< br >"
Call ASCpy()
Response.End()
End If
End Sub
Sub ASCpy()
Response.Write ""
Response.Write "
"
Response.Write("Error happed!
Please Contract ")
Response.Write("Name:")
Response.Write("AloneSword")
Response.Write(".
Thank you!!!
")
Response.Write "
Copyright © By 建大网络 ™
"
Response.Write "Last Modified:21/08/2004
"
Response.Write("Author:AloneSword")
Response.Write "
" Response.Write("
Please Contract ")
Response.Write("Name:")
Response.Write("AloneSword")
Response.Write(".
Thank you!!!
")
Response.Write "
Copyright © By 建大网络 ™
"
Response.Write "Last Modified:21/08/2004
"
Response.Write("Author:AloneSword")
Response.Write "
End Sub
本文来自:http://www.111com.net/
相关文章
- 炉石传说网易云音乐联动怎么玩 网易云音乐联动活动介绍 11-22
- 《潜行者2:切尔诺贝利之心》游戏车辆使用推荐 11-22
- 《潜行者2:切尔诺贝利之心》挡路的特异点处理方法介绍 11-22
- 《潜行者2:切尔诺贝利之心》开局获得满强AK方法介绍 11-22
- 《潜行者2:切尔诺贝利之心》军用防弹背心获得方法介绍 11-22
- 《潜行者2:切尔诺贝利之心》防毒面具获得方法介绍 11-22