app.php 706 B

12345678910111213141516171819202122
  1. <?php
  2. use Symfony\Component\HttpFoundation\Request;
  3. /** @var \Composer\Autoload\ClassLoader $loader */
  4. $loader = require __DIR__.'/../vendor/autoload.php';
  5. if (PHP_VERSION_ID < 70000) {
  6. include_once __DIR__.'/../var/bootstrap.php.cache';
  7. }
  8. $kernel = new AppKernel('prod', false);
  9. if (PHP_VERSION_ID < 70000) {
  10. $kernel->loadClassCache();
  11. }
  12. //$kernel = new AppCache($kernel);
  13. // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
  14. //Request::enableHttpMethodParameterOverride();
  15. $request = Request::createFromGlobals();
  16. $response = $kernel->handle($request);
  17. $response->send();
  18. $kernel->terminate($request, $response);