PHP获取URL

来源:百度知道 编辑:UC知道 时间:2024/06/18 14:13:50
$url_this = "http://".$_SERVER ['HTTP_HOST'].$_SERVER['PHP_SELF'];
echo $url_this;

则显示 : http://localhost/lu.php

要显示用什么方法啊,有高手没??:
http://localhost/

你是要显示结果为http://localhost/

$url_this = "http://".$_SERVER ['HTTP_HOST'];
echo $url_this;

你的问题都没说明白