非法字符检测函数
2005-02-24 09:17:27| 分类:
ASP开发
| 标签:
|举报
|字号大中小 订阅
Function CheckChar(testchar,testpathyes)
CheckChar=true
dim char,pathyes
char=testchar
pathyes=testpathyes
if len(pathyes)=1 then char=replace(char,pathyes,"")
if Instr(char,"=")>0 _
or Instr(char,"")>0 _
or Instr(char,"/")>0 _
or Instr(char,"%")>0 _
or Instr(char,chr(32))>0 _
or Instr(char,"?")>0 _
or Instr(char,"&")>0 _
or Instr(char,"$")>0 _
or Instr(char,";")>0 _
or Instr(char,",")>0 _
or Instr(char,"'")>0 _
or Instr(char,chr(34))>0 _
or Instr(char,chr(9))>0 _
or Instr(char,"??")>0 _
or Instr(char,"*")>0 _
or Instr(char,">")>0 _
or Instr(char,"<")>0 _
or Instr(char,"|")>0 _
or Instr(char,":")>0 _
or Instr(char,"#")>0 then CheckChar=false
End function
评论这张
转发至微博
转发至微博
评论