过滤不安全字符,加密的话,最好搞成dll有服务器条件。
<%
function CheckStr(mystring) ''过滤危险字符函数
mystring=replace(mystring,"'"," ")
mystring=replace(mystring,","," ")
mystring=replace(mystring,""," ")
mystring=replace(mystring,"="," ")
mystring=replace(mystring,"-"," ")
mystring=replace(mystring,"/"," ")
mystring=replace(mystring,""""," ")
mystring=replace(mystring,"&"," ")
mystring=replace(mystring,"<"," ")
mystring=replace(mystring,">"," ")
mystring=replace(mystring,"%"," ")
mystring=replace(mystring,";"," ")
mystring=replace(mystring,"?"," ")
mystring=replace(mystring,"or"," ")
mystring=replace(mystring,"*"," ")
mystring=replace(mystring,"chr"," ")
mystring=replace(mystring,"select"," ")
mystring=replace(mystring,"and"," ")
mystring=replace(mystring,"exec"," ")
mystring=replace(mystring,"insert"," ")
mystring=replace(mystring,"delete"," ")
mystring=replace(mystring,"update"," ")
mystring=replace(mystring,"count"," ")
mystring=replace(mystring,"master"," ")
mystring=replace(mystring,"char"," ")
mystring=replace(mystring,"mid"," ")
mystring=replace(mystring,"declare"," ")
mystring=replace(mystring,"truncate"," ")
mystring=replace(mystring,"“"," ")
mystring=replace(mystring,"‘"," ")
mystring=replace(mystring," ","")
mystring=replace(mystring," ","")
'Fy_In = "'|;|and|(|)|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
CheckStr=mystring
end function '过滤危险字符函数
%>