Files
sterivein/web/index_dev.php
2013-07-17 15:06:53 +02:00

27 lines
610 B
PHP
Executable File

<?php
use Thelia\Core\Thelia;
use Thelia\Core\HttpFoundation\Request;
//use Symfony\Component\DependencyInjection;
$env = 'dev';
require __DIR__ . '/../core/bootstrap.php';
$trustIp = array(
'::1',
'127.0.0.1'
);
$request = Request::createFromGlobals();
if ( false === in_array($request->getClientIp(), $trustIp)) {
//change request to send to a 404 error page
}
$thelia = new Thelia("dev", true);
$response = $thelia->handle($request)->prepare($request)->send();
$thelia->terminate($request, $response);
echo "\n<!-- page parsed in : " . (microtime(true) - $thelia->getStartTime())." s. -->";