zoukankan      html  css  js  c++  java
  • ASP中,有几种方式可以得到进入本页前的URL地址?

    <%

      
    Function   GetUrl()   
          
    On   Error   Resume   Next   
          
    Dim   strTemp   
      
    If   LCase(Request.ServerVariables("HTTPS"))   =   "off"   Then   
      strTemp   
    =   "http://"   
      
    Else   
      strTemp   
    =   "https://"   
                      
    End   If   
          strTemp   
    =   strTemp   &   Request.ServerVariables("SERVER_NAME")   
          
    If   Request.ServerVariables("SERVER_PORT")   <>   80   Then     
                  strTemp   
    =   strTemp   &   ":"   &   Request.ServerVariables("SERVER_PORT")   
          
    end   if   
          strTemp   
    =   strTemp   &   Request.ServerVariables("URL")   
          
    If   Trim(Request.QueryString)   <>   ""   Then     
                  strTemp   
    =   strTemp   &   "?"   &   Trim(Request.QueryString)   
          
    end   if   
          GetUrl   
    =   strTemp   
      
    End   Function   
        
        
      response.write   
    "from:"   &   geturl()   
      response.end()   

    %
    >


    Request.ServerVariables("HTTP_REFERER")  

    申明

    非源创博文中的内容均收集自网上,若有侵权之处,请及时联络,我会在第一时间内删除.再次说声抱歉!!!

    博文欢迎转载,但请给出原文连接。

  • 相关阅读:
    PowerDesigner小技巧(整理中)
    将日志(Microsoft.Extensions.Logging)添加到.NET Core控制台应用程序
    VMware Workstation Pro 15.5.0 官方版本及激活密钥
    Git 设置和取消代理(SOCKS5代理)
    笔记
    哈希表(Hash Table)与哈希算法
    Elasticsearch分词
    微服务理论
    Elasticsearch与Mysql数据同步
    go语言常用命令
  • 原文地址:https://www.cnblogs.com/Athrun/p/1119203.html
Copyright © 2011-2022 走看看