Last active
October 11, 2016 07:52
-
-
Save wpottier/c4c552b56fee1d1b1d46 to your computer and use it in GitHub Desktop.
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 | |
| use Symfony\Component\HttpFoundation\Request; | |
| umask(0000); | |
| if (!isset($_SERVER['APPLICATION_ENV'])) { | |
| $_SERVER['APPLICATION_ENV'] = 'prod'; | |
| } | |
| /** | |
| * @var Composer\Autoload\ClassLoader | |
| */ | |
| $loader = require __DIR__.'/../app/autoload.php'; | |
| include_once __DIR__.'/../var/bootstrap.php.cache'; | |
| if ($_SERVER['APPLICATION_ENV'] == 'prod' && isset($_SERVER['AUTOLOAD_APC']) && $_SERVER['AUTOLOAD_APC']) { | |
| // Enable APC for autoloading to improve performance. | |
| // You should change the ApcClassLoader first argument to a unique prefix | |
| // in order to prevent cache key conflicts with other applications | |
| // also using APC. | |
| $apcLoader = new Symfony\Component\ClassLoader\ApcClassLoader(sha1(__FILE__), $loader); | |
| $loader->unregister(); | |
| $apcLoader->register(true); | |
| } | |
| $kernel = new AppKernel($_SERVER['APPLICATION_ENV'], $_SERVER['APPLICATION_ENV'] == 'dev'); | |
| $kernel->loadClassCache(); | |
| $request = Request::createFromGlobals(); | |
| $response = $kernel->handle($request); | |
| $response->send(); | |
| $kernel->terminate($request, $response); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Utilisation Apache :
SetEnv APPLICATION_ENV "dev"