-
-
Save tiagosampaio/2757076e8180130754d6ec303c75764e to your computer and use it in GitHub Desktop.
Magento 2 - Request Flow / Bootstrap - bootstrap.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copyright © 2015 Magento. All rights reserved. | |
* See COPYING.txt for license details. | |
*/ | |
/** | |
* Environment initialization | |
*/ | |
error_reporting(E_ALL); | |
#ini_set('display_errors', 1); | |
umask(0); | |
/* PHP version validation */ | |
if (version_compare(phpversion(), '5.5.0', '<') === true) { | |
if (PHP_SAPI == 'cli') { | |
echo 'Magento supports PHP 5.5.0 or later. ' . | |
'Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html'; | |
} else { | |
echo <<<HTML | |
<div style="font:12px/1.35em arial, helvetica, sans-serif;"> | |
<p>Magento supports PHP 5.5.0 or later. Please read | |
<a target="_blank" href="http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html"> | |
Magento System Requirements</a>. | |
</div> | |
HTML; | |
} | |
exit(1); | |
} | |
require_once __DIR__ . '/autoload.php'; | |
require_once BP . '/app/functions.php'; | |
if (!empty($_SERVER['MAGE_PROFILER']) | |
&& isset($_SERVER['HTTP_ACCEPT']) | |
&& strpos($_SERVER['HTTP_ACCEPT'], 'text/html') !== false | |
) { | |
\Magento\Framework\Profiler::applyConfig( | |
$_SERVER['MAGE_PROFILER'], | |
BP, | |
!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' | |
); | |
} | |
date_default_timezone_set('UTC'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment