php 跳转函数,与获取当前页面的URL地址

  1. function url_this(){
  2. $url = "http://".$_server ["http_host"].$_server["request_uri"];
  3. $return_url = "<a href='$url'>$url</a>";
  4. return $return_url;
  5. }
  6. //跳转函数
  7. function url_redirect($url,$delay=''){
  8. if($delay == ''){
  9. echo "<script>window.location.href='$url'</script>";
  10. }else{//开源代码phpfensi.com
  11. echo "<meta http-equiv='refresh' content='$delay;url=$url' />";
  12. }
  13. }
  14. } //end func