还是不行,我觉得应该是这段代码的问题.Function IsSelfRefer() Dim sHttp_Referer, sServer_Name sHttp_Referer = CStr(Request.ServerVariables("HTTP_REFERER")) sServer_Name = CStr(Request.ServerVariables("SERVER_NAME")) If Mid(sHttp_Referer, 8, Len(sServer_Name)) = sServer_Name Then IsSelfRefer = True Else IsSelfRefer = False End If End Function