Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
index.php
Go to the documentation of this file.
1 <?php
11 
12 try {
13  require __DIR__ . '/../app/bootstrap.php';
14 } catch (\Exception $e) {
15  echo <<<HTML
16 <div style="font:12px/1.35em arial, helvetica, sans-serif;">
17  <div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;">
18  <h3 style="margin:0;font-size:1.7em;font-weight:normal;text-transform:none;text-align:left;color:#2f2f2f;">
19  Autoload error</h3>
20  </div>
21  <p>{$e->getMessage()}</p>
22 </div>
23 HTML;
24  exit(1);
25 }
26 
27 $params = $_SERVER;
28 $params[Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS] = [
29  DirectoryList::PUB => [DirectoryList::URL_PATH => ''],
30  DirectoryList::MEDIA => [DirectoryList::URL_PATH => 'media'],
31  DirectoryList::STATIC_VIEW => [DirectoryList::URL_PATH => 'static'],
32  DirectoryList::UPLOAD => [DirectoryList::URL_PATH => 'media/upload'],
33 ];
36 $app = $bootstrap->createApplication(\Magento\Framework\App\Http::class);
37 $bootstrap->run($app);
static create($rootDir, array $initParams, ObjectManagerFactory $factory=null)
Definition: Bootstrap.php:119
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60
exit
Definition: redirect.phtml:12
const BP
Definition: autoload.php:14
catch(\Exception $e) $params
Definition: index.php:27
$app
Definition: index.php:38
catch(\Exception $e) $bootstrap
Definition: index.php:36