git-svn-id: http://xe-core.googlecode.com/svn/trunk@1268 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-04-23 01:48:05 +00:00
parent be0be12cd3
commit 6f8e1fd915

View file

@ -485,8 +485,7 @@
$hostname = $_SERVER['SERVER_NAME']; $hostname = $_SERVER['SERVER_NAME'];
$port = $_SERVER['SERVER_PORT']; $port = $_SERVER['SERVER_PORT'];
if($port!=80) $hostname .= ":{$port}"; if($port!=80) $hostname .= ":{$port}";
$path = $_SERVER['REDIRECT_URL']; $path = str_replace('index.php','',$_SERVER['SCRIPT_NAME']);
$path = $_SERVER['REDIRECT_URL']?$_SERVER['REDIRECT_URL']:preg_replace('/([a-zA-Z0-9\_]+).php/i','',$_SERVER['PHP_SELF']);
return sprintf("http://%s%s",$hostname,$path); return sprintf("http://%s%s",$hostname,$path);
} }