ça m'agace ce truc
This commit is contained in:
parent
7158eeeb76
commit
e64097ae1d
1 changed files with 2 additions and 2 deletions
|
@ -82,8 +82,8 @@ function serverUrl($return_subfolder = false)
|
||||||
$serverport = ($_SERVER["SERVER_PORT"]=='80' || ($https && $_SERVER["SERVER_PORT"]=='443') ? '' : ':'.$_SERVER["SERVER_PORT"]);
|
$serverport = ($_SERVER["SERVER_PORT"]=='80' || ($https && $_SERVER["SERVER_PORT"]=='443') ? '' : ':'.$_SERVER["SERVER_PORT"]);
|
||||||
if($return_subfolder === true) {
|
if($return_subfolder === true) {
|
||||||
$path = pathinfo( $_SERVER['PHP_SELF'] );
|
$path = pathinfo( $_SERVER['PHP_SELF'] );
|
||||||
if( $path['dirname'] != '/' )
|
$finalslash = ( $path['dirname'] != '/' ) ? '/' : '';
|
||||||
$subfolder = $path['dirname'] .'/';
|
$subfolder = $path['dirname'] . $finalslash;
|
||||||
} else $subfolder = '';
|
} else $subfolder = '';
|
||||||
return 'http'.($https?'s':'').'://'.$_SERVER["SERVER_NAME"].$serverport.$subfolder;
|
return 'http'.($https?'s':'').'://'.$_SERVER["SERVER_NAME"].$serverport.$subfolder;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue