app.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Symfony\Component\ClassLoader\ApcClassLoader;
  3. use Symfony\Component\HttpFoundation\Request;
  4. // If you don't want to setup permissions the proper way, just uncomment the following PHP line
  5. // read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
  6. umask(0000);
  7. $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
  8. // Enable APC for autoloading to improve performance.
  9. // You should change the ApcClassLoader first argument to a unique prefix
  10. // in order to prevent cache key conflicts with other applications
  11. // also using APC.
  12. /*
  13. $apcLoader = new ApcClassLoader(sha1(__FILE__), $loader);
  14. $loader->unregister();
  15. $apcLoader->register(true);
  16. */
  17. require_once __DIR__.'/../app/AppKernel.php';
  18. //require_once __DIR__.'/../app/AppCache.php';
  19. require_once __DIR__.'/legacy.php';
  20. $kernel = new AppKernel('prod', false);
  21. $kernel->loadClassCache();
  22. //$kernel = new AppCache($kernel);
  23. // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
  24. Request::enableHttpMethodParameterOverride();
  25. $request = Request::createFromGlobals();
  26. $response = $kernel->handle($request);
  27. $response->send();
  28. $kernel->terminate($request, $response);