获取当前asp的完整url

Posted on 2008-07-05 08:48  Leon0812  阅读(416)  评论(0)    收藏  举报
Function GetUrl()
   
Dim ScriptAddress,Servername,qs
   ScriptAddress 
= CStr(Request.ServerVariables("SCRIPT_NAME"))
   Servername 
= CStr(Request.ServerVariables("Server_Name"))
   qs
=Request.QueryString
   
if qs<>"" then
   GetUrl 
="http://"& Servername & ScriptAddress &"?"&qs
   
else
   GetUrl 
="http://"& Servername & ScriptAddress
   
end if
End Function

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3