Initial commit

This commit is contained in:
2021-09-16 20:27:51 +08:00
commit 5ed6195cc1
41 changed files with 3429 additions and 0 deletions

23
public/index.php Normal file
View 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';