Home >Backend Development >PHP Tutorial >PHP jump function and obtain the URL address of the current page

PHP jump function and obtain the URL address of the current page

高洛峰
高洛峰Original
2016-11-29 15:13:431492browse

function url_this(){ 
        $url = "http://".$_server ["http_host"].$_server["request_uri"]; 
        $return_url = "<a href="http://www.php.cn/">; 
        return $return_url; 
    } 
 
//跳转函数 
function url_redirect($url,$delay=&#39;&#39;){ 
 if($delay == &#39;&#39;){ 
  echo "<script>window.location.href="http://www.php.cn/">; 
 }else{//开源代码phpfensi.com 
  echo "<meta http-equiv=&#39;refresh&#39; content=&#39;$delay;url=$url&#39; />"; 
 } 
 
} 
 
} //end func


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn