Created
April 28, 2012 07:28
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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