index.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Application entry point
  4. *
  5. * Example - run a particular store or website:
  6. * --------------------------------------------
  7. * require __DIR__ . '/app/bootstrap.php';
  8. * $params = $_SERVER;
  9. * $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'website2';
  10. * $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website';
  11. * $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
  12. * \/** @var \Magento\Framework\App\Http $app *\/
  13. * $app = $bootstrap->createApplication(\Magento\Framework\App\Http::class);
  14. * $bootstrap->run($app);
  15. * --------------------------------------------
  16. *
  17. * Copyright © Magento, Inc. All rights reserved.
  18. * See COPYING.txt for license details.
  19. */
  20. try {
  21. require __DIR__ . '/app/bootstrap.php';
  22. } catch (\Exception $e) {
  23. echo <<<HTML
  24. <div style="font:12px/1.35em arial, helvetica, sans-serif;">
  25. <div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;">
  26. <h3 style="margin:0;font-size:1.7em;font-weight:normal;text-transform:none;text-align:left;color:#2f2f2f;">
  27. Autoload error</h3>
  28. </div>
  29. <p>{$e->getMessage()}</p>
  30. </div>
  31. HTML;
  32. exit(1);
  33. }
  34. $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
  35. /** @var \Magento\Framework\App\Http $app */
  36. $app = $bootstrap->createApplication(\Magento\Framework\App\Http::class);
  37. $bootstrap->run($app);