Fixes for relative paths for Windows Web Servers
This commit is contained in:
parent
a6c20808e7
commit
16651cf8f7
|
@ -147,13 +147,16 @@ $Parsedown = new Parsedown();
|
||||||
$Security = new Security();
|
$Security = new Security();
|
||||||
|
|
||||||
// HTML PATHs
|
// HTML PATHs
|
||||||
//$base = (dirname(getenv('SCRIPT_NAME'))==DS)?'/':dirname(getenv('SCRIPT_NAME')).'/';
|
|
||||||
$base = empty( $_SERVER['SCRIPT_NAME'] ) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
|
$base = empty( $_SERVER['SCRIPT_NAME'] ) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
|
||||||
$base = dirname($base);
|
$base = dirname($base);
|
||||||
|
|
||||||
if($base!=DS) {
|
if($base!=DS) {
|
||||||
$base = $base.'/';
|
$base = $base.'/';
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// Workaround for Windows Web Servers
|
||||||
|
$base = '/';
|
||||||
|
}
|
||||||
|
|
||||||
define('HTML_PATH_ROOT', $base);
|
define('HTML_PATH_ROOT', $base);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue