public/index.php line 24

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. date_default_timezone_set('Europe/Kiev');
  7. header('Access-Control-Allow-Origin: *');
  8. header('Access-Control-Allow-Methods: GET, POST, ');
  9. header("Access-Control-Allow-Headers: X-Requested-With");
  10. require dirname(__DIR__).'/vendor/autoload.php';
  11. (new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
  12. if ($_SERVER['APP_DEBUG']) {
  13.     umask(0000);
  14.     Debug::enable();
  15. }
  16. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  17. $request Request::createFromGlobals();
  18. $response $kernel->handle($request);
  19. $response->send();
  20. $kernel->terminate($request$response);