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")  

    申明

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

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

  • 相关阅读:
    CB文件读入后输出中文乱码问题
    2019-ICPC-沈阳站打铁感想
    计蒜客习题:画图游戏(Havel-Hakimi定理)
    计蒜客练习题:接龙(带权并查集)
    搜索----Dungeon Master
    最短路 poj1502 MPI Maelstrom
    poj 3259 Wormholes
    Silver Cow Party
    Til the Cows Come Home
    Cow Contest
  • 原文地址:https://www.cnblogs.com/Athrun/p/1119203.html
Copyright © 2011-2022 走看看