如何在经典asp中获取应用程序或网站的基本URL [英] How Do I get an Base Url of an application or website in classic asp
问题描述
您好,
有人能告诉我如何在经典的asp中获得网站或网络应用程序的基本网址。
就像我在vb.net中这样做,如下所示
Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial。权限)+ Request.ApplicationPath
如何在经典的asp中转换上面的内容。
Hello,
Can anybody tell me how do i get an base url of an website or web application in an classic asp.
Like i am doing this in vb.net like the below
Dim baseUrl As String = Request.Url.GetLeftPart(UriPartial.Authority) + Request.ApplicationPath
how to convert the above in classic asp.
推荐答案
Hi
我认为您可以使用Request.ServerVariables来获取网址的各个部分。结合它你就会得到确切的网址。
Ex:
Hi
I think you can use Request.ServerVariables to get the parts of the url. And combining that you will get the exact url.
For Ex:
Request.ServerVariables("HTTPS")
Request.ServerVariables("HTTP_HOST")
Request.ServerVariables("SERVER_PORT")
从w3schools你会得到一些有用的服务器变量列表。
http://www.w3schools.com/asp/coll_servervariables.asp [ ^ ]
问候
Dominic Abraham
From the w3schools you will get some list of the useful server variables.
http://www.w3schools.com/asp/coll_servervariables.asp[^]
Regards
Dominic Abraham
这篇关于如何在经典asp中获取应用程序或网站的基本URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!