diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/app.php | 30 | ||||
-rw-r--r-- | web/app_dev.php | 30 | ||||
l--------- | web/bundles/acmedemo | 1 | ||||
l--------- | web/bundles/framework | 1 | ||||
l--------- | web/bundles/sensiodistribution | 1 |
5 files changed, 63 insertions, 0 deletions
diff --git a/web/app.php b/web/app.php new file mode 100644 index 00000000..c5c26409 --- /dev/null +++ b/web/app.php | |||
@@ -0,0 +1,30 @@ | |||
1 | <?php | ||
2 | |||
3 | use Symfony\Component\ClassLoader\ApcClassLoader; | ||
4 | use Symfony\Component\HttpFoundation\Request; | ||
5 | |||
6 | $loader = require_once __DIR__.'/../app/bootstrap.php.cache'; | ||
7 | |||
8 | // Enable APC for autoloading to improve performance. | ||
9 | // You should change the ApcClassLoader first argument to a unique prefix | ||
10 | // in order to prevent cache key conflicts with other applications | ||
11 | // also using APC. | ||
12 | /* | ||
13 | $apcLoader = new ApcClassLoader(sha1(__FILE__), $loader); | ||
14 | $loader->unregister(); | ||
15 | $apcLoader->register(true); | ||
16 | */ | ||
17 | |||
18 | require_once __DIR__.'/../app/AppKernel.php'; | ||
19 | //require_once __DIR__.'/../app/AppCache.php'; | ||
20 | |||
21 | $kernel = new AppKernel('prod', false); | ||
22 | $kernel->loadClassCache(); | ||
23 | //$kernel = new AppCache($kernel); | ||
24 | |||
25 | // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter | ||
26 | //Request::enableHttpMethodParameterOverride(); | ||
27 | $request = Request::createFromGlobals(); | ||
28 | $response = $kernel->handle($request); | ||
29 | $response->send(); | ||
30 | $kernel->terminate($request, $response); | ||
diff --git a/web/app_dev.php b/web/app_dev.php new file mode 100644 index 00000000..e0279c2a --- /dev/null +++ b/web/app_dev.php | |||
@@ -0,0 +1,30 @@ | |||
1 | <?php | ||
2 | |||
3 | use Symfony\Component\HttpFoundation\Request; | ||
4 | use Symfony\Component\Debug\Debug; | ||
5 | |||
6 | // If you don't want to setup permissions the proper way, just uncomment the following PHP line | ||
7 | // read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information | ||
8 | //umask(0000); | ||
9 | |||
10 | // This check prevents access to debug front controllers that are deployed by accident to production servers. | ||
11 | // Feel free to remove this, extend it, or make something more sophisticated. | ||
12 | if (isset($_SERVER['HTTP_CLIENT_IP']) | ||
13 | || isset($_SERVER['HTTP_X_FORWARDED_FOR']) | ||
14 | || !(in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1')) || php_sapi_name() === 'cli-server') | ||
15 | ) { | ||
16 | header('HTTP/1.0 403 Forbidden'); | ||
17 | exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); | ||
18 | } | ||
19 | |||
20 | $loader = require_once __DIR__.'/../app/bootstrap.php.cache'; | ||
21 | Debug::enable(); | ||
22 | |||
23 | require_once __DIR__.'/../app/AppKernel.php'; | ||
24 | |||
25 | $kernel = new AppKernel('dev', true); | ||
26 | $kernel->loadClassCache(); | ||
27 | $request = Request::createFromGlobals(); | ||
28 | $response = $kernel->handle($request); | ||
29 | $response->send(); | ||
30 | $kernel->terminate($request, $response); | ||
diff --git a/web/bundles/acmedemo b/web/bundles/acmedemo new file mode 120000 index 00000000..d07485de --- /dev/null +++ b/web/bundles/acmedemo | |||
@@ -0,0 +1 @@ | |||
../../src/Acme/DemoBundle/Resources/public/ \ No newline at end of file | |||
diff --git a/web/bundles/framework b/web/bundles/framework new file mode 120000 index 00000000..b828f069 --- /dev/null +++ b/web/bundles/framework | |||
@@ -0,0 +1 @@ | |||
../../vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/public/ \ No newline at end of file | |||
diff --git a/web/bundles/sensiodistribution b/web/bundles/sensiodistribution new file mode 120000 index 00000000..2886899e --- /dev/null +++ b/web/bundles/sensiodistribution | |||
@@ -0,0 +1 @@ | |||
../../vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/public/ \ No newline at end of file | |||