我没有得到请求的页面ID url

时间:2012-07-20 08:20:24

标签: php url get

function getUrl() {
  $url  = @( $_SERVER["HTTPS"] != 'on' ) ? 'http://'.$_SERVER["SERVER_NAME"] :  'https://'.$_SERVER["SERVER_NAME"];
  $url .= ( $_SERVER["SERVER_PORT"] !== 80 ) ? ":".$_SERVER["SERVER_PORT"] : "";
  $url .= $_SERVER["REQUEST_URI"];
  return $url;
}
?>

if($ sessionUser == 1 || $ sessionSeller == 1 || $ sessionadmin == 1){?>                     :*                                “onClick =”validate_form('frm_comment')“/>
      “/>        

“onClick =”window.location.href ='login.php?event = Account& url ='“'”/>

仍然显示获取网址是这样的:/login.php?event =帐户& url =

如何获取/login.php?event=Account&url=205 .....或其他任何内容的页面

1 个答案:

答案 0 :(得分:0)

<?php 
      $getUrl = $_GET['url']; 
      echo $getUrl;
?>