private function findDocumentRootInScriptFileName()
    {

        $filename = $this->server->get('SCRIPT_FILENAME') ?: false;
        if (false === $filename) {
            return false;
        }
        $parse = explode('/', $filename);
        $count = count($parse);
        if ($count && $count > 1) {
            $path = array_slice($parse, 0, $count-1);
            return $this->removeLastSlash(join('/', $path));
        } else {
            return '/';
        }

    }