Fixes for relative paths for Windows Web Servers

This commit is contained in:
dignajar 2015-11-13 20:41:30 -03:00
parent a6c20808e7
commit 16651cf8f7
1 changed files with 4 additions and 1 deletions

View File

@ -147,13 +147,16 @@ $Parsedown = new Parsedown();
$Security = new Security();
// HTML PATHs
//$base = (dirname(getenv('SCRIPT_NAME'))==DS)?'/':dirname(getenv('SCRIPT_NAME')).'/';
$base = empty( $_SERVER['SCRIPT_NAME'] ) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
$base = dirname($base);
if($base!=DS) {
$base = $base.'/';
}
else {
// Workaround for Windows Web Servers
$base = '/';
}
define('HTML_PATH_ROOT', $base);