private function buildRootPath()
    {
        // In Windows script path uses backslash, convert it:
        $scriptPath = str_replace('\\', '/', $_SERVER['PHP_SELF']);
        $rootPath = str_replace(' ', '%20', rtrim(substr($scriptPath, 0, strpos($scriptPath, 'index.php')), '/'));

        return $rootPath;
    }