public/index.php line 25

Open in your IDE?
  1. <?php
  2. require_once dirname(__DIR__).'/vendor/autoload.php';
  3. use App\Kernel;
  4. use Symfony\Component\ErrorHandler\Debug;
  5. use Symfony\Component\HttpFoundation\Request;
  6. require dirname(__DIR__).'/vendor/autoload.php';
  7. require dirname(__DIR__).'/config/bootstrap.php';
  8. set_time_limit(3000);
  9. if ($_SERVER['APP_DEBUG']) {
  10.     umask(0000);
  11.     Debug::enable();
  12. }
  13. if ($trustedProxies $_SERVER['TRUSTED_PROXIES'] ?? false) {
  14.     Request::setTrustedProxies(explode(','$trustedProxies), Request::HEADER_X_FORWARDED_FOR Request::HEADER_X_FORWARDED_PORT Request::HEADER_X_FORWARDED_PROTO);
  15. }
  16. if ($trustedHosts $_SERVER['TRUSTED_HOSTS'] ?? false) {
  17.     Request::setTrustedHosts([$trustedHosts]);
  18. }
  19. $kernel = new App\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);