Asp-Classic
如何在 Classic ASP 中獲取目前域?
我想獲取目前域,所以如果頁面是http://www.domain.com/page.asp我需要
www.domain.com
Request.ServerVariables("SERVER_NAME")'要完整,我的功能之一:
function PageUrl dim sPort sPort = Request.ServerVariables("SERVER_PORT") if sPort = "80" then sPort = "" else sPort = ":" & sPort end if PageUrl = "http://" & Request.ServerVariables("SERVER_NAME") & sPort & _ Request.ServerVariables("URL") & "?" & _ Request.ServerVariables("QUERY_STRING") end function
請求伺服器變數之一(server_name?)