public/index.php line 32

Open in your IDE?
  1. <?php
  2. if ('/date/' === parse_url((string) $_SERVER['REQUEST_URI'], PHP_URL_PATH)) {
  3.     echo (new DateTime())->format('M j, Y H:i:s O')."\n";
  4.     exit;
  5. }
  6. use App\Kernel;
  7. use Symfony\Component\ErrorHandler\Debug;
  8. use Symfony\Component\HttpFoundation\Request;
  9. require dirname(__DIR__).'/config/bootstrap.php';
  10. if ($_SERVER['APP_DEBUG']) {
  11.     umask(0000);
  12.     Debug::enable();
  13. }
  14. if ($trustedProxies $_SERVER['TRUSTED_PROXIES'] ?? false) {
  15.     Request::setTrustedProxies(explode(',', (string) $trustedProxies), Request::HEADER_X_FORWARDED_ALL Request::HEADER_X_FORWARDED_HOST);
  16. }
  17. if ($trustedHosts $_SERVER['TRUSTED_HOSTS'] ?? false) {
  18.     Request::setTrustedHosts([$trustedHosts]);
  19. }
  20. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  21. $request Request::createFromGlobals();
  22. $response $kernel->handle($request);
  23. $response->send();
  24. $kernel->terminate($request$response);