public/index.php line 30

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