[求助]action=FormatSQL(SafeRequest("action",0))
action=FormatSQL(SafeRequest("action",0))这是什么意思,
知道了,是自定义function,下面是定义的内容,检查安全性的。
Function SafeRequest(ParaName,ParaType)
Dim ParaValue
ParaValue=Request(ParaName)
If ParaType=1 then
If not isNumeric(ParaValue) then
Response.write "<center>参数" & ParaName & "必须为数字型,请正确操作!</center>"
Response.end
End if
Else
ParaValue=replace(ParaValue,"'","''")
End if
SafeRequest=ParaValue
End function
Function FormatSQL(strChar)
if strChar="" then
FormatSQL=""
else
FormatSQL=replace(replace(replace(replace(replace(replace(replace(strChar,"'","’"),"*","×"),"?","?"),"(","("),")",")"),"<","〈"),";",";")
end if
End Function