- Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathindex-example.php
More file actions
22 lines (18 loc) · 528 Bytes
/
index-example.php
File metadata and controls
22 lines (18 loc) · 528 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
define('WFW_ROOT_DIR', __DIR__);
define('WFW_TIMEZONE', 'Europe/Berlin');
include WFW_ROOT_DIR.'/vendor/autoload.php';
$DEBUG = FALSE;
ini_set('display_errors', 'Off');
try {
$service = new \WebApp\Service();
$service->run();
} catch (\Throwable $e) {
\TgLog\Log::error('Cannot create application', $e);
header("HTTP/1.1 500 Internal Error");
echo '<h1>Internal Error</h1>';
echo '<p>Cannot create application.</p>';
if ($DEBUG) {
echo('<pre>'.\TgUtils\FormatUtils::getTraceAsString($e).'</pre>');
}
}