Created
May 24, 2013 14:13
-
-
Save daum/5643805 to your computer and use it in GitHub Desktop.
This file contains 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 | |
use Symfony\Component\ClassLoader\ApcClassLoader; | |
use Symfony\Component\HttpFoundation\Request; | |
$loader = require_once __DIR__.'/../app/bootstrap.php.cache'; | |
// Use APC for autoloading to improve performance. | |
// Change 'sf2' to a unique prefix in order to prevent cache key conflicts | |
// with other applications also using APC. | |
/* | |
$loader = new ApcClassLoader('sf2', $loader); | |
$loader->register(true); | |
*/ | |
require_once __DIR__.'/../app/AppKernel.php'; | |
//require_once __DIR__.'/../app/AppCache.php'; | |
$kernel = new AppKernel('prod', false); | |
$kernel->loadClassCache(); | |
//$kernel = new AppCache($kernel); | |
$request = Request::createFromGlobals(); | |
Request::setTrustedProxies(array('192.168.1.1')); | |
// If it is only available via the proxy: | |
//Request::setTrustedProxies(array($request->server->get('REMOTE_ADDR'))); | |
$response = $kernel->handle($request); | |
$response->send(); | |
$kernel->terminate($request, $response); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment