-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.php
32 lines (28 loc) · 942 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
32
<?php
define('LINE_DELIMITER', "\n");
define('TAB_INDENT', "\t");
define('DS', DIRECTORY_SEPARATOR);
define('SYS_ROOT', dirname(__FILE__) . DS);
define('SYS_CONF', SYS_ROOT . 'etc' . DS);
header('Content-Type: text/html; CharSet=UTF-8');
include (SYS_CONF . 'cmd.inc.php');
include (SYS_ROOT . 'al.php');
use LeePHP\Bootstrap;
use LeePHP\C;
$dis = new Bootstrap();
$dis->setTimeZone('Asia/Shanghai')
->setErrorLevel(E_ALL ^ E_NOTICE)
->setLogLevel(0)
->setLogDir(SYS_ROOT . 'logs')
->setControllerNs('Application\Controller')
->setDbAutoCommit(true)
->setDbPersistent(false)
->setTemplateCacheEnable(true)
->setTemplateAutoReload(true)
->setTemplateEngine(C::TPL_ENGINE_TWIG)
->setTemplateDirectory(SYS_ROOT . 'templates' . DS)
->setCompileDirectory(SYS_ROOT . 'templates_c' . DS)
->setIniFiles(array(
'default' => SYS_CONF . 'config.ini'
))
->dispatch($argv, $g_cmd_hash);