public/index.php line 27

Open in your IDE?
  1. <?php
  2. use App\Kernel;
  3. use Symfony\Component\Dotenv\Dotenv;
  4. use Symfony\Component\ErrorHandler\Debug;
  5. use Symfony\Component\HttpFoundation\Request;
  6. require dirname(__DIR__).'/vendor/autoload.php';
  7. (new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
  8. umask(0002);
  9. // FORCE DEV FOR DEVELOPERs
  10. if($_SERVER['APP_ENV'] == 'prod' && in_array($_SERVER['REMOTE_ADDR'], ['78.199.61.9''91.121.41.153'])) {
  11.   $_SERVER['APP_DEBUG'] = true;
  12.   $_SERVER['APP_ENV'] = "debugprod";
  13. }
  14. if ($_SERVER['APP_DEBUG']) {
  15. //    umask(0000);
  16.     Debug::enable();
  17. }
  18. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  19. $request Request::createFromGlobals();
  20. $response $kernel->handle($request);
  21. $response->send();
  22. $kernel->terminate($request$response);