/** * Set the subdirectory part of the url, from the url */ protected static function _setWebroot() { self::$_webroot = defined('\\thebuggenie\\core\\entities\\_CLI') ? '.' : dirname($_SERVER['PHP_SELF']); if (stristr(PHP_OS, 'WIN')) { self::$_webroot = str_replace("\\", "/", self::$_webroot); /* Windows adds a \ to the URL which we don't want */ } if (self::$_webroot[strlen(self::$_webroot) - 1] != '/') { self::$_webroot .= '/'; } }