.
img
注册时间:--
  • 纯文字版本
    开 关闭
  • 消息
  • 收藏
  • 退出

ASP中用于获取当前页面URL的函数

2013/5/17 9:03:00  人气 487    技术交流区  
<%
Function Cur_Url()‘获取当前页面URL的函数
Dim Domain_Name,Page_Name,Quary_Name
Domain_Name = LCase(Request.ServerVariables(“Server_Name“))
Page_Name = LCase(Request.ServerVariables(“Script_Name“))
Quary_Name = LCase(Request.ServerVariables(“Quary_String“))
If Quary_Name = ““ Then
Quary_Name = LCase(Request.QueryString)
End If
If Quary_Name =““ Then
Cur_Url = “ http://“&Domain_Name&Page_Name
Else
Cur_Url=“ http://“&Domain_Name&Page_Name&“?“&Quary_Name
End If
End Function
%>
完整代码:
<%
Dim Domain_Name,Page_Name,Quary_Name
Domain_Name = LCase(Request.ServerVariables(“Server_Name“))
Page_Name = LCase(Request.ServerVariables(“Script_Name“))
Quary_Name = LCase(Request.ServerVariables(“Quary_String“))
If Quary_Name = ““ Then
Quary_Name = LCase(Request.QueryString)
End If
If Quary_Name =““ Then
Cur_Url = “http://“&Domain_Name&Page_Name
Else
Cur_Url=“http://“&Domain_Name&Page_Name&“?“&Quary_Name
End If
Response.Write(Cur_Url)
Response.End()
%>
茅山道长(ID1365)加精此贴05-17 09:02

. [forecolor=#8600ff]我就是传说,我说的话就是真理[/forecolor]

发表回复

   


  通知楼主
暂无回复!
今天肿么都在骂
古月哥欠(2937)装B哥
谁要备案,提供资料,我免费
拼音域名 百度收录780多
新火互联空间优惠出售
2元支付宝征集广告语
为毛拉黑呆猫哪个逗比?别人
今天ip破千了,pv破万了
返回技术交流区
AD