Str = trim(Str) Str = Replace(Str, "'", "''",1,-1,1) fn_chk_to_sql_mark = Str End Function %>
<%Function fn_chk_to_sql_go(Str) '如sql = "select * from "&request("table")的情况下.?? If Isnull(Str) Then ChkSql = "" Exit Function End If Str = trim(Str) Str = Replace(Str, Chr(0), "",1,-1,1) Str = Replace(Str, """", """,1,-1,1) Str = Replace(Str, "'", "'",1,-1,1) Str = Replace(Str, "<","<",1,-1,1) Str = Replace(Str, ">",">",1,-1,1) Str = Replace(Str, "[", "[",1,-1,1) Str = Replace(Str, "]", "]",1,-1,1) Str = Replace(Str, "\", "\",1,-1,1) Str = Replace(Str, "*", "*",1,-1,1) Str = Replace(Str, "%", "%",1,-1,1) Str = Replace(Str, ";", ";",1,-1,1) Str = Replace(Str, vbCrlf, "<br>",1,-1,1) Str = Replace(Str, "--", "--") fn_chk_to_sql_go = Str End Function %>
<%Function fn_chk_to_url(Str)
'如 str="<img src='showimg.asp?id="&request("id")&"'>"的情况下 If Isnull(Str) Then ChkSql = "" Exit Function End If Str = trim(Str) Str = server.URLEncode(Str) fn_chk_to_sql_mark = Str End Function %>
复制本页网址和标题,发送给你QQ/Msn的好友一起分享
上一篇:VBScript语法速查及实例说明
下一篇:明晰程序异常的来源 ASP错误处理小结