app_dev.php 721 B

12345678910111213141516171819202122
  1. <?php
  2. ini_set('date.timezone', 'UTC');
  3. // this check prevents access to debug front controllers that are deployed by accident to production servers.
  4. // feel free to remove this, extend it, or make something more sophisticated.
  5. if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
  6. '127.0.0.1',
  7. '::1',
  8. ))) {
  9. header('HTTP/1.0 403 Forbidden');
  10. die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
  11. }
  12. require_once __DIR__.'/../app/bootstrap.php.cache';
  13. require_once __DIR__.'/../app/AppKernel.php';
  14. use Symfony\Component\HttpFoundation\Request;
  15. $kernel = new AppKernel('dev', true);
  16. $kernel->loadClassCache();
  17. $kernel->handle(Request::createFromGlobals())->send();