asp獲取當前URL代碼

字號:


    asp獲取當前URL
    asp并不像javascript那樣直接用函數(shù)取得當前url,以前天真的認為asp沒有取得當前url的方法。但最近發(fā)現(xiàn),其實是可以的。 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