我想要获取当前域,所以如果页面是http://www.domain.com/page.asp,我需要www.domain.com
发布于 2010-01-28 01:30:38
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
发布于 2010-01-28 01:30:25
请求服务器变量之一(server_name?)
发布于 2011-09-30 18:43:12
将此放在函数末尾,以便在没有querystring元素时删除?
,因为末尾的随机?
可能不是您想要的:
If right(PageUrl,1)="?" then PageUrl = left(PageUrl,len(PageUrl)-1)
https://stackoverflow.com/questions/2148952
复制相似问题