BUG Escape % symbole for Symphony 4
1 |
<?php
|
|
2 |
|
|
3 |
// CLI specific bootstrapping
|
|
4 |
use SilverStripe\Control\CLIRequestBuilder; |
|
5 |
use SilverStripe\Control\HTTPApplication; |
|
6 |
use SilverStripe\Core\CoreKernel; |
|
7 |
|
|
8 |
require __DIR__ . '/src/includes/autoload.php'; |
|
9 |
|
|
10 |
// Ensure that people can't access this from a web-server
|
|
11 |
if (!in_array(PHP_SAPI, ["cli", "cgi", "cgi-fcgi"])) { |
|
12 |
echo "cli-script.php can't be run from a web request, you have to run it on the command-line."; |
|
13 |
die(); |
|
14 |
}
|
|
15 |
|
|
16 |
// Build request and detect flush
|
|
17 |
$request = CLIRequestBuilder::createFromEnvironment(); |
|
18 |
|
|
19 |
// Default application
|
|
20 |
$kernel = new CoreKernel(BASE_PATH); |
|
21 |
$app = new HTTPApplication($kernel); |
|
22 |
$response = $app->handle($request); |
|
23 |
$response->output(); |
Read our documentation on viewing source code .