app.php 996 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. use Symfony\Component\ClassLoader\ApcClassLoader;
  3. use Symfony\Component\HttpFoundation\Request;
  4. $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
  5. // Use APC for autoloading to improve performance.
  6. // Change 'sf2' to a unique prefix in order to prevent cache key conflicts
  7. // with other applications also using APC.
  8. /*
  9. $apcLoader = new ApcClassLoader('sf2', $loader);
  10. $loader->unregister();
  11. $apcLoader->register(true);
  12. */
  13. require_once __DIR__.'/../app/AppKernel.php';
  14. //require_once __DIR__.'/../app/AppCache.php';
  15. require_once __DIR__.'/legacy.php';
  16. $kernel = new AppKernel('prod', true);
  17. $kernel->loadClassCache();
  18. //$kernel = new AppCache($kernel);
  19. // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
  20. //Request::enableHttpMethodParameterOverride();
  21. $request = Request::createFromGlobals();
  22. $response = $kernel->handle($request);
  23. $response->send();
  24. $kernel->terminate($request, $response);