我是用Request.ServerVariables("HTTP_REFERER")这一句
在WEB上是可以得到的,但是在手机浏览的页面,得到的就为空.
判断上一页的来源 http://www.w3sky.com/2409.html
取得本页地址 http://www.w3sky.com/2973.html
<%
Function GetUrl()
On Error Resume Next
Dim strTemp
If LCase(Request.ServerVariables("HTTPS")) = "off" Then
strTemp = "http://"
Else
strTemp = "https://"
End If
strTemp = strTemp & Request.ServerVariables("SERVER_NAME")
If Request.ServerVariables("SERVER_PORT") <> 80 Then
strTemp = strTemp & ":" & Request.ServerVariables("SERVER_PORT")
end if
strTemp = strTemp & Request.ServerVariables("URL")
If Trim(Request.QueryString) <> "" Then
strTemp = strTemp & "?" & Trim(Request.QueryString)
end if
GetUrl = strTemp
End Function
response.write "来访地址:" & geturl()
response.end()
%>
博客指出在WEB上使用Request.ServerVariables(\HTTP_REFERER\)可获取信息,但在手机浏览页面得到的为空。同时给出判断上一页来源和取得本页地址的链接,并展示了一个获取当前页面完整URL的ASP函数及调用示例。
7668

被折叠的 条评论
为什么被折叠?



