Function SafeRequest(ParaName,ParaType)
'--- 传入参数 ---
'ParaName:参数名称-字符型
'ParaType:参数类型-数字型(1表示以上参数是数字,0表示以上参数为字符)
Dim ParaValue
ParaValue=Request(ParaName)
If ParaType=1 then
If ParaValue="" then
ParaValue=1
end if
if not isNumeric(ParaValue) then
Response.write "参数" & ParaName & "必须为数字型!"
Response.end
End if
Else
ParaValue = Replace(ParaValue,Chr(0),"")
ParaValue = Replace(ParaValue,"<","<")
ParaValue = Replace(ParaValue,">",">")
ParaValue = Replace(ParaValue,"'","''")
ParaValue = Replace(ParaValue,"""","''")
End if
SafeRequest = trim(ParaValue)
End Function
------分隔线----------------------------
- 上一篇:nginx+keepalived实现热备
- 下一篇:各种工具之正则表达式语法比较

百鸣[Baiming.org]欢迎您~