2007-07-19 12:40:28 +02:00
|
|
|
<?php
|
2012-03-31 09:09:45 +02:00
|
|
|
|
2017-06-20 05:34:34 +02:00
|
|
|
use SilverStripe\Control\HTTPRequestBuilder;
|
2017-06-07 08:07:33 +02:00
|
|
|
use SilverStripe\Core\AppKernel;
|
|
|
|
use SilverStripe\Core\HTTPApplication;
|
|
|
|
use SilverStripe\Core\Startup\ErrorControlChainMiddleware;
|
|
|
|
|
|
|
|
require __DIR__ . '/src/includes/autoload.php';
|
|
|
|
|
2017-06-13 04:10:59 +02:00
|
|
|
// Build request and detect flush
|
2017-06-20 05:34:34 +02:00
|
|
|
$request = HTTPRequestBuilder::createFromEnvironment();
|
2017-06-13 04:10:59 +02:00
|
|
|
|
|
|
|
// Default application
|
2017-06-20 05:34:34 +02:00
|
|
|
$kernel = new AppKernel(BASE_PATH);
|
2017-06-07 08:07:33 +02:00
|
|
|
$app = new HTTPApplication($kernel);
|
2017-06-19 08:07:53 +02:00
|
|
|
$app->addMiddleware(new ErrorControlChainMiddleware($app));
|
2017-06-20 05:34:34 +02:00
|
|
|
$response = $app->handle($request);
|
|
|
|
$response->output();
|