Initial commit
This commit is contained in:
23
public/index.php
Normal file
23
public/index.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
if (preg_match(
|
||||
'/\.css|\.js|\.jpg|\.png$/',
|
||||
$_SERVER['REQUEST_URI'],
|
||||
$match
|
||||
)) {
|
||||
$mimeTypes = [
|
||||
'.css' => 'text/css',
|
||||
'.js' => 'application/javascript',
|
||||
'.jpg' => 'image/jpg',
|
||||
'.png' => 'image/png'
|
||||
];
|
||||
$path = __DIR__ . $_SERVER['REQUEST_URI'];
|
||||
if (is_file($path)) {
|
||||
header("Content-Type: {$mimeTypes[$match[0]]}");
|
||||
require $path;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
require 'core/Bootstrap.php';
|
Reference in New Issue
Block a user