public/index.php line 28

Open in your IDE?
  1. <?php
  2. use App\Kernel;
  3. use Symfony\Component\Debug\Debug;
  4. use Symfony\Component\Dotenv\Dotenv;
  5. use Symfony\Component\HttpFoundation\Request;
  6. require __DIR__.'/../vendor/autoload.php';
  7. // The check is to ensure we don't use .env in production
  8. if (!isset($_SERVER['APP_ENV'])) {
  9.     (new Dotenv())->load(__DIR__.'/../.env');
  10. }
  11. if ($_SERVER['APP_DEBUG'] ?? false) {
  12.     // WARNING: You should setup permissions the proper way!
  13.     // REMOVE the following PHP line and read
  14.     // https://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup
  15.     umask(0000);
  16.     Debug::enable();
  17. }
  18. Request::setTrustedProxies(['10.0.0.4'], Request::HEADER_X_FORWARDED_ALL);
  19. $kernel = new Kernel($_SERVER['APP_ENV'] ?? 'dev'$_SERVER['APP_DEBUG'] ?? false);
  20. $request Request::createFromGlobals();
  21. $response $kernel->handle($request);
  22. $response->send();
  23. $kernel->terminate($request$response);