10 error_reporting(E_ALL);
11 #ini_set('display_errors', 1); 14 if (!defined(
'PHP_VERSION_ID') || !(PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) {
15 if (PHP_SAPI ==
'cli') {
16 echo
'Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. ' .
17 'Please read http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html';
20 <div style=
"font:12px/1.35em arial, helvetica, sans-serif;">
21 <p>
Magento supports PHP 7.0.2, 7.0.4, and 7.0.6 or later. Please read
22 <a target=
"_blank" href=
"http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html">
23 Magento System Requirements</a>.
30 require_once
__DIR__ .
'/autoload.php';
39 if (empty($_SERVER[
'ENABLE_IIS_REWRITES']) || ($_SERVER[
'ENABLE_IIS_REWRITES'] != 1)) {
43 unset($_SERVER[
'HTTP_X_REWRITE_URL']);
44 unset($_SERVER[
'HTTP_X_ORIGINAL_URL']);
45 unset($_SERVER[
'IIS_WasUrlRewritten']);
46 unset($_SERVER[
'UNENCODED_URL']);
47 unset($_SERVER[
'ORIG_PATH_INFO']);
51 (!empty($_SERVER[
'MAGE_PROFILER']) || file_exists(
BP .
'/var/profiler.flag'))
52 && isset($_SERVER[
'HTTP_ACCEPT'])
53 && strpos($_SERVER[
'HTTP_ACCEPT'],
'text/html') !==
false 55 $profilerConfig = isset($_SERVER[
'MAGE_PROFILER']) && strlen($_SERVER[
'MAGE_PROFILER'])
56 ? $_SERVER[
'MAGE_PROFILER']
59 if ($profilerConfig) {
60 $profilerConfig = json_decode($profilerConfig,
true) ?: $profilerConfig;
66 !empty($_SERVER[
'HTTP_X_REQUESTED_WITH']) && $_SERVER[
'HTTP_X_REQUESTED_WITH'] ==
'XMLHttpRequest' 70 date_default_timezone_set(
'UTC');
74 ini_set(
'serialize_precision', 14);
ini_set($varName, $newValue)
defined('TESTS_BP')||define('TESTS_BP' __DIR__
static applyConfig($config, $baseDir, $isAjax=false)
static populateAutoloader($rootDir, $initParams)