OpenXE/www/api/bootstrap.php

19 lines
546 B
PHP
Raw Permalink Normal View History

2021-05-21 08:49:41 +02:00
<?php
use Xentral\Modules\Api\Engine\ApiContainer;
if (!defined('API_REQUEST')) {
define('API_REQUEST', true);
}
if (!class_exists('Config', true)) {
// Anpassung für Demo-Server; dort liegen Config und Anwendung in unterschiedlichen Verzeichnissen
include dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME']))) . DIRECTORY_SEPARATOR . 'conf/main.conf.php';
}
if (isset($_SERVER['HTTP_MULTIDB']) && (string)$_SERVER['HTTP_MULTIDB'] !== '') {
define('MULTIDB', (string)$_SERVER['HTTP_MULTIDB']);
}
return new ApiContainer();