Eigenes CSS statt Framework, Vanilla-JavaScript, heller und dunkler Modus. Ohne JavaScript bleibt alles bedienbar; das Liniendiagramm faellt auf eine selbst gezeichnete Balkendarstellung zurueck, wenn das CDN nicht erreichbar ist. Chart.js ist auf eine Version festgelegt und per Subresource Integrity an seinen Hash gebunden. Die Domain-Seite enthaelt eine Schritt-fuer-Schritt-Anleitung fuer DNS, Hosting-Panel und Zertifikat samt Fehlersuche.
46 lines
1.2 KiB
PHP
46 lines
1.2 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Einziger Einstiegspunkt der Anwendung.
|
|
*
|
|
* Verzeichnisstruktur (Standard):
|
|
* /public <- Webroot (diese Datei)
|
|
* /src, /templates, /migrations, /data, /vendor <- ausserhalb des Webroots
|
|
*
|
|
* Fuer Shared Hosting ohne eigenen Webroot siehe README (Variante B):
|
|
* dort liegt zusaetzlich eine .htaccess im Stammverzeichnis, die alle
|
|
* Anfragen an public/index.php weiterreicht.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\App;
|
|
use App\Config;
|
|
|
|
$rootDir = dirname(__DIR__);
|
|
|
|
$autoload = $rootDir . '/vendor/autoload.php';
|
|
if (!is_file($autoload)) {
|
|
http_response_code(500);
|
|
header('Content-Type: text/html; charset=utf-8');
|
|
echo '<!doctype html><meta charset="utf-8"><title>Installation unvollständig</title>'
|
|
. '<h1>Abhängigkeiten fehlen</h1>'
|
|
. '<p>Der Ordner <code>vendor/</code> wurde nicht gefunden. '
|
|
. 'Bitte <code>composer install</code> ausführen oder das fertige Release-Paket hochladen.</p>';
|
|
exit;
|
|
}
|
|
|
|
require $autoload;
|
|
|
|
$config = Config::load($rootDir);
|
|
|
|
if ($config->isDevelopment()) {
|
|
ini_set('display_errors', '1');
|
|
error_reporting(E_ALL);
|
|
} else {
|
|
ini_set('display_errors', '0');
|
|
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
|
|
}
|
|
|
|
(new App($config))->run();
|