webroot/public/index.php
2024-11-26 01:03:56 +01:00

21 lines
414 B
PHP

<?php
use App\Kernel;
use Symfony\Component\Dotenv\Dotenv;
$project_root=dirname(__DIR__);
$autoload_php=$project_root . '/vendor/autoload_runtime.php';
require_once $autoload_php;
if (file_exists($project_root . "/.env")) {
(new Dotenv())->usePutenv()->bootEnv($project_root . "/.env");
}
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};