From 02fef47025c61021228520cd11a16c48cfa99564 Mon Sep 17 00:00:00 2001 From: Bedder Date: Fri, 13 Nov 2015 07:10:50 -0600 Subject: [PATCH] Update init.php --- kernel/boot/init.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/kernel/boot/init.php b/kernel/boot/init.php index 30b24324..315bb3f1 100644 --- a/kernel/boot/init.php +++ b/kernel/boot/init.php @@ -146,7 +146,19 @@ $Url = new Url(); $Parsedown = new Parsedown(); $Security = new Security(); -// Relative path logic +// 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.'/'; +} + +if (dirname($_SERVER['SCRIPT_NAME']) == '\\') { + $base = '/'; +} + define('HTML_PATH_ROOT', '/'); // Paths for themes