public/index.php line 34

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. use App\Kernel;
  11. use Symfony\Component\ErrorHandler\Debug;
  12. use Symfony\Component\Dotenv\Dotenv;
  13. use Symfony\Component\HttpFoundation\Request;
  14. require __DIR__.'/../vendor/autoload.php';
  15. // The check is to ensure we don't use .env in production
  16. if (!isset($_SERVER['APP_ENV'])) {
  17.     (new Dotenv())->load(__DIR__.'/../.env');
  18. }
  19. if ($_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev'))) {
  20.     umask(0000);
  21.     Debug::enable();
  22. }
  23. // Request::setTrustedProxies(['0.0.0.0/0'], Request::HEADER_FORWARDED);
  24. $kernel = new Kernel($_SERVER['APP_ENV'] ?? 'dev'$_SERVER['APP_DEBUG'] ?? ('prod' !== ($_SERVER['APP_ENV'] ?? 'dev')));
  25. $request Request::createFromGlobals();
  26. $response $kernel->handle($request);
  27. $response->send();
  28. $kernel->terminate($request$response);