2016-08-01 16:04:44 +00:00
|
|
|
<?php
|
2016-09-07 22:28:28 +00:00
|
|
|
|
2019-10-03 19:24:12 +00:00
|
|
|
require_once __DIR__ . '/vendor/autoload.php';
|
2020-05-13 20:57:25 +00:00
|
|
|
|
2020-10-22 21:08:40 +00:00
|
|
|
use Alltube\App;
|
2020-10-18 10:03:57 +00:00
|
|
|
use Alltube\ErrorHandler;
|
2015-10-29 20:19:40 +00:00
|
|
|
|
2016-10-26 15:16:17 +00:00
|
|
|
if (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '/index.php') !== false) {
|
2019-10-03 19:24:12 +00:00
|
|
|
header('Location: ' . str_ireplace('/index.php', '/', $_SERVER['REQUEST_URI']));
|
2016-07-27 00:19:29 +00:00
|
|
|
die;
|
|
|
|
}
|
|
|
|
|
2020-07-15 21:05:41 +00:00
|
|
|
try {
|
|
|
|
// Create app.
|
|
|
|
$app = new App();
|
2019-04-21 16:30:02 +00:00
|
|
|
|
2017-10-02 19:07:13 +00:00
|
|
|
$app->run();
|
2020-05-13 20:33:02 +00:00
|
|
|
} catch (Throwable $e) {
|
2020-10-18 10:03:57 +00:00
|
|
|
ErrorHandler::handle($e);
|
2017-10-02 19:07:13 +00:00
|
|
|
}
|