获取域名后的第一个文件夹
网页的url为:
http://127.0.0.1/test/position/index.asp
如何获得域名后的第一个文件夹也就是:
test
<%=request.ServerVariables("URL") %>获取的是:/test/position/index.asp
<%=mid(request.ServerVariables("URL"),2,4) %>虽然能获得,test,
但如果这个文件夹是不固定的就没有办法,如果变成
http://127.0.0.1/test12/position/index.asp就又变得不可行了。