PHP_VERSION, 'version_id' => PHP_VERSION_ID, 'sapi' => PHP_SAPI]));
}
if (PHP_VERSION_ID < 80100) {
Phar::mapPhar('contao-manager.phar');
@include 'phar://contao-manager.phar/downgrade.php';
die('');
}
if (function_exists('date_default_timezone_set') && function_exists('date_default_timezone_get')) {
date_default_timezone_set(@date_default_timezone_get());
}
if ('cli' === PHP_SAPI || !isset($_SERVER['REQUEST_URI'])) {
Phar::mapPhar('contao-manager.phar');
require 'phar://contao-manager.phar/api/console';
} else {
function rewrites()
{
// The function argument is unreliable across servers, Nginx for example is always empty
list(,$url) = explode(basename(__FILE__), $_SERVER['REQUEST_URI'], 2);
if (strpos($url, '..')) {
return false;
}
if ('' === $url) {
header('Location: /'.basename(__FILE__).'/');
exit;
}
if (0 === strpos($url, '/api/')) {
return '/dist/api.php'.$url;
}
if (!empty($url) && is_file('phar://'.__FILE__.'/dist'.$url)) {
return '/dist'.$url;
}
return '/dist/index.html';
}
Phar::webPhar(
null,
'index.html',
null,
array(
'log' => 'text/plain',
'txt' => 'text/plain',
'php' => Phar::PHP, // parse as PHP
'css' => 'text/css',
'gif' => 'image/gif',
'html' => 'text/html',
'ico' => 'image/x-ico',
'jpg' => 'image/jpeg',
'jpeg' => 'image/jpeg',
'js' => 'application/x-javascript',
'png' => 'image/png',
'svg' => 'image/svg+xml',
'json' => 'application/json'
),
'rewrites'
);
}
__HALT_COMPILER(); ?>
P - .box/bin/check-requirements.php `i ^ʨ .box/.requirements.php `i