app_dev.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. //echo 'Hello world';
  3. error_reporting(E_ALL);
  4. ini_set('display_errors', 1);
  5. //phpinfo();
  6. //die();
  7. //error_reporting(E_ERROR);
  8. use Symfony\Component\HttpFoundation\Request;
  9. // If you don't want to setup permissions the proper way, just uncomment the following PHP line
  10. // read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
  11. //umask(0000);
  12. // This check prevents access to debug front controllers that are deployed by accident to production servers.
  13. // Feel free to remove this, extend it, or make something more sophisticated.
  14. if (isset($_SERVER['HTTP_CLIENT_IP'])
  15. || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
  16. || !in_array(@$_SERVER['REMOTE_ADDR'], array(
  17. '127.0.0.1',
  18. '::1',
  19. '109.190.39.74',
  20. ))
  21. && False) {
  22. header('HTTP/1.0 403 Forbidden');
  23. exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
  24. }
  25. $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
  26. require_once __DIR__.'/../app/AppKernel.php';
  27. $kernel = new AppKernel('dev', true);
  28. $kernel->loadClassCache();
  29. $request = Request::createFromGlobals();
  30. $response = $kernel->handle($request);
  31. $response->send();
  32. $kernel->terminate($request, $response);