zB:
PHP-Code:
<?php
/*
* This file is part of Contao.
*
* (c) Leo Feyer
*
* @license LGPL-3.0-or-later
*/
use Contao\ManagerBundle\ContaoManager\Plugin as ManagerBundlePlugin;
use Contao\ManagerBundle\HttpKernel\ContaoCache;
use Contao\ManagerBundle\HttpKernel\ContaoKernel;
use Symfony\Component\HttpFoundation\Request;
$date = DateTime::createFromFormat('U.u', microtime(TRUE));
file_put_contents('debug.log', $date->format('[Y-m-d H:i:s.u]') . " start of app.php\n", FILE_APPEND);
// Suppress error messages (see #1422)
@ini_set('display_errors', 0);
// Disable the phar stream wrapper for security reasons (see #105)
if (\in_array('phar', stream_get_wrappers(), true)) {
stream_wrapper_unregister('phar');
}
/** @var Composer\Autoload\ClassLoader */
$loader = require __DIR__.'/../vendor/autoload.php';
ManagerBundlePlugin::autoloadModules(__DIR__.'/../system/modules');
ContaoKernel::setProjectDir(dirname(__DIR__));
$kernel = new ContaoKernel('prod', false);
// Enable the Symfony reverse proxy
$kernel = new ContaoCache($kernel);
Request::enableHttpMethodParameterOverride();
// Handle the request
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
$date = DateTime::createFromFormat('U.u', microtime(TRUE));
file_put_contents('debug.log', $date->format('[Y-m-d H:i:s.u]') . " end\n", FILE_APPEND);
Das erzeugt dann eine web/debug.log Datei mit zB folgenden Einträgen:
Code:
[2019-01-26 10:55:52.382700] start of app.php
[2019-01-26 10:55:52.674700] end
[2019-01-26 10:55:52.732700] start of app.php
[2019-01-26 10:55:53.028400] end