From 210e5d5ca52d65df93118764d528e3270eb9c587 Mon Sep 17 00:00:00 2001 From: Robin Appelman <icewind1991@gmail.com> Date: Sun, 19 Sep 2010 12:24:09 +0200 Subject: [PATCH] improved loading speed of default syle sheet --- css/default.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/css/default.php b/css/default.php index dd96b97a86..663dcf0d87 100644 --- a/css/default.php +++ b/css/default.php @@ -1,6 +1,11 @@ <?php header('Content-Type: text/css'); -require_once('../inc/lib_base.php'); +// calculate the documentroot +$SERVERROOT=substr(__FILE__,0,-16); +$DOCUMENTROOT=realpath($_SERVER['DOCUMENT_ROOT']); +$SERVERROOT=str_replace("\\",'/',$SERVERROOT); +$SUBURI=substr(realpath($_SERVER["SCRIPT_FILENAME"]),strlen($SERVERROOT)); +$WEBROOT=substr($_SERVER["SCRIPT_NAME"],0,strlen($_SERVER["SCRIPT_NAME"])-strlen($SUBURI)); ?> html, body { background-color: #F9F9F9; -- GitLab