代码改变世界

url函数

2008-10-23 09:05  zhangbaoyu  阅读(229)  评论(0编辑  收藏  举报

//host url
echo "1:".$_SERVER['HTTP_HOST']."<br>";
//page url
echo "2:".$_SERVER['PHP_SELF']."<br>";
//request query string
echo "3:".$_SERVER["QUERY_STRING"]."<br>";
//become url
//echo $_SERVER['HTTP_REFERER']."<br>";

echo "4:".$_SERVER["REQUEST_URI"]."<br>";

echo "5:".$_SERVER["SERVER_NAME"]."<br>";

echo "6:".$_SERVER["SERVER_PORT"]."<br>";