Moved public dir to root
This commit is contained in:
47
index.php
Normal file
47
index.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Informatica Eindproject D4p
|
||||
* 6in3, Stedelijk Gymnasium Nijmegen
|
||||
* Docent: Hans de Wolf
|
||||
*
|
||||
* ==================
|
||||
*
|
||||
* Daniel Boutros,
|
||||
* Christiaan Goossens,
|
||||
* Jelmer Hinssen
|
||||
*/
|
||||
|
||||
/**
|
||||
* Session fix for development
|
||||
*/
|
||||
|
||||
if (session_save_path() === "") {
|
||||
ini_set('session.save_path', realpath(__DIR__ . '/../tmp'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the script is running in CLI mode
|
||||
*/
|
||||
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;
|
||||
} elseif (pathinfo($url['path'], PATHINFO_EXTENSION) !== "") {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Require the Composer autoloader to load dependencies
|
||||
*/
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
/**
|
||||
* Load the bootstrapping script
|
||||
*/
|
||||
|
||||
include __DIR__ . '/src/bootstrap.php';
|
Reference in New Issue
Block a user