forked from friendica/friendica-directory
First commit
This commit is contained in:
commit
201edf2e4a
115 changed files with 29451 additions and 0 deletions
36
public/index.php
Normal file
36
public/index.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
ini_set('error_log', __DIR__ . '/../logs/http.log');
|
||||
ini_set('log_errors', true);
|
||||
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
session_start();
|
||||
|
||||
// Instantiate the app
|
||||
$settings = require __DIR__ . '/../src/settings.php';
|
||||
|
||||
$container = new Slim\Container($settings);
|
||||
|
||||
// Set up dependencies
|
||||
require __DIR__ . '/../src/dependencies.php';
|
||||
|
||||
$app = new \Slim\App($container);
|
||||
|
||||
// Register middleware
|
||||
require __DIR__ . '/../src/middleware.php';
|
||||
|
||||
// Register routes
|
||||
require __DIR__ . '/../src/routes.php';
|
||||
|
||||
// Run app
|
||||
$app->run();
|
Loading…
Add table
Add a link
Reference in a new issue