Preview: index.php
Size: 859 B
/var/www/podiomigration.bitkit.dk/httpdocs/public/index.php
<?php
// Start session
session_start();
// Suppress all deprecation and notice warnings
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_USER_DEPRECATED);
ini_set('display_errors', '0');
if (PHP_SAPI == 'cli-server') {
// To help the built-in PHP dev server, check if the request was actually for
// something which should probably be served as a static file
$url = parse_url($_SERVER['REQUEST_URI']);
$file = __DIR__ . $url['path'];
if (is_file($file)) {
return false;
}
}
// Autoload dependencies
require __DIR__ . '/../vendor/autoload.php';
// Create Slim app
$app = new \App\App;
// Register service provider with the container
$app->add(new \Slim\HttpCache\Cache('public', 86400));
// Load routes
require __DIR__ . '/../src/routes.php';
// Run the application
$app->run();
Directory Contents
Dirs: 2 × Files: 4