-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
41 lines (35 loc) · 1.41 KB
/
index.php
File metadata and controls
41 lines (35 loc) · 1.41 KB
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
<?php
//ini_set('display_errors', 'on');
//error_reporting(E_ALL);
define('LT', '3.0');
define('LT_APP_DIR', __DIR__ . DIRECTORY_SEPARATOR);
//define('LT_APP_DIR','/var/www/www/awoz'.DIRECTORY_SEPARATOR);
define('LT_INC_DIR', LT_APP_DIR . 'include' . DIRECTORY_SEPARATOR);
define('LT_CFG_DIR', LT_APP_DIR . 'config' . DIRECTORY_SEPARATOR);
define('LT_TPL_DIR', LT_APP_DIR . 'template' . DIRECTORY_SEPARATOR);
define('LT_DIR', LT_INC_DIR . 'LT' . DIRECTORY_SEPARATOR);
define('LT_CACHE_DIR', LT_APP_DIR . 'cache' . DIRECTORY_SEPARATOR);
define('LT_LOG_DIR', LT_APP_DIR . 'logs' . DIRECTORY_SEPARATOR);
define('LT_STORAGE_DIR', LT_APP_DIR . 'storage' . DIRECTORY_SEPARATOR);
require LT_DIR . 'LT.php';
//LT::preload('prepare.inc');
try {
\MyLT::run();
} catch (\PA\Exception $e) {
if ((\LT\Config::value('core.mode') == 'web') && in_array($e->getCode(), array('404'))) {
(new \LT\View(':error/' . $e->getCode()))->output();
} else {
\LT\Response::code($e->getCode(), $e->getMessage(), $e->getData());
}
} catch (\LT\Exception $e) {
\LT\Logger::error($e);
\LT\Response::badRequest($e->getMessage());
} catch (\Exception $e) {
\LT\Logger::error($e);
\LT\Response::badRequest($e->getMessage());
// echo '<pre>', var_dump($e), '</pre>';
exit;
echo '<pre>', var_dump($e->getMessage()), '</pre>';
echo '<pre>', var_dump($e->getTrace()), '</pre>';
// \LT::error($e->getMessage());
}