1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-06-27 16:36:00 +00:00
wallabag/web/app.php

22 lines
765 B
PHP
Raw Permalink Normal View History

2015-01-22 08:30:07 +01:00
<?php
2025-02-17 00:16:18 +01:00
use Symfony\Component\Dotenv\Dotenv;
2015-01-22 08:30:07 +01:00
use Symfony\Component\HttpFoundation\Request;
2018-10-24 21:02:35 +02:00
require __DIR__.'/../vendor/autoload.php';
2015-01-22 08:30:07 +01:00
2025-02-17 00:16:18 +01:00
putenv('APP_ENV=' . $_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = 'prod');
putenv('APP_DEBUG=' . $_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
(new Dotenv())->bootEnv(dirname(__DIR__) . '/.env');
$kernel = new AppKernel($_SERVER['APP_ENV'], (bool )$_SERVER['APP_DEBUG']);
2015-01-22 08:30:07 +01:00
//$kernel = new AppCache($kernel);
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);