-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
31 lines (27 loc) · 817 Bytes
/
index.php
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
<?php
require 'vendor/autoload.php';
use Symfony\Component\HttpFoundation\Request;
define('BASEDIR', __DIR__ . '/');
define('APPDIR' , BASEDIR . 'app/');
define('SYSDIR' , BASEDIR . 'system/');
define('VENDORDIR',BASEDIR . 'vendor/');
define('VIEWSDIR', APPDIR . 'views/');
// define set of local environments
$environments = array(
'local' => array('localhost')
);
// Enable powerful debugger for local only.
if (in_array($_SERVER['HTTP_HOST'], $environments['local'])) {
require SYSDIR . 'php_error.php';
$options = array(
'enable_saving' => false,
'snippet_num_lines' => 10
);
\php_error\reportErrors($options);
}
// start running the application
require SYSDIR . 'app.php';
$app = new App(Request::createFromGlobals());
$app->start();
$app->router->run();
$app->shutdown();