Bug fix #118: Display server port

This commit is contained in:
Frederic Guillot 2013-08-04 16:41:23 -04:00
parent ea1c5fdfbf
commit 3bfbd3dd50

View File

@ -6,6 +6,7 @@ function get_current_base_url()
{
$url = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
$url .= $_SERVER['SERVER_NAME'];
$url .= $_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443 ? '' : ':'.$_SERVER['SERVER_PORT'];
$url .= dirname($_SERVER['PHP_SELF']).'/';
return $url;