Source of file index.php
Size: 1,019 Bytes - Last Modified: 2021-12-23T10:34:48+00:00
/var/www/docs.ssmods.com/process/src/docs/examples/index.php
123456789101112131415161718192021222324252627282930313233343536 | <?php use SilverStripe\Control\HTTPApplication; use SilverStripe\Control\HTTPRequestBuilder; use SilverStripe\Core\CoreKernel; use SilverStripe\Core\Startup\ErrorControlChainMiddleware; // Find autoload.php if (file_exists(__DIR__ . '/vendor/autoload.php')) { require __DIR__ . '/vendor/autoload.php'; } elseif (file_exists(__DIR__ . '/../vendor/autoload.php')) { require __DIR__ . '/../vendor/autoload.php'; } else { header('HTTP/1.1 500 Internal Server Error'); echo 'autoload.php not found'; exit(1); } $requestHandler = require 'staticrequesthandler.php'; // successful cache hit if ($requestHandler('cache') !== false) { die; } header('X-Cache-Miss: ' . date(\Datetime::COOKIE)); // Build request and detect flush $request = HTTPRequestBuilder::createFromEnvironment(); // Default application $kernel = new CoreKernel(BASE_PATH); $app = new HTTPApplication($kernel); $app->addMiddleware(new ErrorControlChainMiddleware($app)); $response = $app->handle($request); $response->output(); |