1
0
mirror of https://github.com/Rudloff/alltube.git synced 2024-06-25 07:27:46 +02:00
alltube/index.php
2020-10-22 23:11:29 +02:00

21 lines
415 B
PHP

<?php
require_once __DIR__ . '/vendor/autoload.php';
use Alltube\App;
use Alltube\ErrorHandler;
if (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '/index.php') !== false) {
header('Location: ' . str_ireplace('/index.php', '/', $_SERVER['REQUEST_URI']));
die;
}
try {
// Create app.
$app = new App();
$app->run();
} catch (Throwable $e) {
ErrorHandler::handle($e);
}