-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
41 lines (32 loc) · 753 Bytes
/
index.php
File metadata and controls
41 lines (32 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* Created by PhpStorm.
* Date: 5.3.2019
* Time: 13.24
*/
require("vendor/autoload.php");
use App\Controllers\ErrorController;
define("APP_VERSION", "0.1");
define("APP_ROOT", __DIR__);
$f3 = \Base::instance();
$f3->set('DEBUG', 3);
$f3->set("UI", "view/");
$f3->set('ONERROR',
function ($f3) {
/**
* @var \Base $f3
*/
// recursively clear existing output buffers:
while (ob_get_level()) {
ob_end_clean();
}
$error = new ErrorController();
if ($f3->get("ERROR.code") == 404) {
$error->get404($f3);
return;
} else {
$error->getGeneric($f3);
return;
}
});
new \App\Bootstrapper($f3);