Skip to content

Instantly share code, notes, and snippets.

@coreymcmahon
Created April 28, 2012 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coreymcmahon/2516853 to your computer and use it in GitHub Desktop.
Save coreymcmahon/2516853 to your computer and use it in GitHub Desktop.
Front controller for a Symfony 2 project development environment - http://www.symfonycentral.com
<?php
if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
'127.0.0.1',
'::1',
))) {
header('HTTP/1.0 403 Forbidden');
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
require_once __DIR__.'/../app/bootstrap.php.cache';
require_once __DIR__.'/../app/AppKernel.php';
use Symfony\Component\HttpFoundation\Request;
$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$kernel->handle(Request::createFromGlobals())->send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment