view index.php @ 130:ee5f98a0bc93

Retrieve documents from DOCUMENT_ROOT, not SCRIPT_ROOT
author Tom Fredrik Blenning <bfg@bfgconsult.no>
date Fri, 13 Jan 2023 18:08:45 +0100
parents 6766250a0baa
children b6b4a58c7625
line wrap: on
line source

<?php
/**
 * @file
 * Main access point for webpages
 */
include_once 'constants.inc';

include_once 'CacheTimeCheck.inc';

/// @cond
$baseDir = dirname(__FILE__);
$scriptCache = ScriptIncludeCache::instance(__FILE__);

$scriptCache->includeOnce('Language.inc', $baseDir);
$scriptCache->includeOnce('Options.inc', $baseDir);
$scriptCache->includeOnce('common-functions.inc', $baseDir);
$scriptCache->includeOnce('filters.inc', $baseDir);
$scriptCache->includeOnce('InputParser.inc', $baseDir);
$scriptCache->includeOnce('Logger.inc', $baseDir);

if (DEBUG_LEVEL >= VERBOSITY_DEBUG) {
  var_dump($_SERVER);
}

try {
  $base=basePath();
  $base=$_SERVER['DOCUMENT_ROOT'];
  $target=$base . "/master.xml";
  $input = new InputParser($target, $cache);
  $input->display();
}
catch (Exception $e) {
  errorPage($e, StatusCodes::HTTP_INTERNAL_SERVER_ERROR);
}
/// @endcond

?>