'--------------------------------------------------------------------------------------'
' 函数名: CheckPostUrl
' 描述: 防止外部数据提交
'--------------------------------------------------------------------------------------'
Function CheckPostUrl()
Dim Server_v1,Server_v2
CheckPostUrl = False
Server_v1 = CStr(Request.ServerVariables("HTTP_REFERER"))
Server_v2 = CStr(Request.ServerVariables("SERVER_NAME"))
If Mid(Server_v1,8,Len(Server_v2))<>Server_v2 Then
CheckPostUrl = False
Else
CheckPostUrl = True
End If
End function
'方法调用
If CheckPostUrl = False Then
Response.Write "<center>您提交的数据不合法,请不要从外部提交数据。<center>"
Response.End
End If
' 函数名: CheckPostUrl
' 描述: 防止外部数据提交
'--------------------------------------------------------------------------------------'
Function CheckPostUrl()
Dim Server_v1,Server_v2
CheckPostUrl = False
Server_v1 = CStr(Request.ServerVariables("HTTP_REFERER"))
Server_v2 = CStr(Request.ServerVariables("SERVER_NAME"))
If Mid(Server_v1,8,Len(Server_v2))<>Server_v2 Then
CheckPostUrl = False
Else
CheckPostUrl = True
End If
End function
'方法调用
If CheckPostUrl = False Then
Response.Write "<center>您提交的数据不合法,请不要从外部提交数据。<center>"
Response.End
End If