public/index.php line 29

Open in your IDE?
  1. <?php
  2. ini_set('display_startup_errors'1);
  3. ini_set('display_errors'1);
  4. error_reporting(-1);
  5. use App\Kernel;
  6. use Symfony\Component\Debug\Debug;
  7. use Symfony\Component\HttpFoundation\Request;
  8. require dirname(__DIR__).'/config/bootstrap.php';
  9. if ($_SERVER['APP_DEBUG']) {
  10.     umask(0000);
  11.     Debug::enable();
  12. }
  13. if ($trustedProxies $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
  14.     Request::setTrustedProxies(explode(','$trustedProxies), Request::HEADER_X_FORWARDED_ALL Request::HEADER_X_FORWARDED_HOST);
  15. }
  16. if ($trustedHosts $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
  17.     Request::setTrustedHosts([$trustedHosts]);
  18. }
  19. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  20. $request Request::createFromGlobals();
  21. $response $kernel->handle($request);
  22. $response->send();
  23. $kernel->terminate($request$response);