{$e->getMessage()}
HTML; exit(1); } $siteHandler = new SiteHandler(__DIR__ . '/'); $siteCode = $siteHandler->detectSiteCode($_SERVER); $params = $_SERVER; $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = $siteCode; $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website'; $params[Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS] = [ DirectoryList::PUB => [DirectoryList::URL_PATH => ''], DirectoryList::MEDIA => [DirectoryList::URL_PATH => 'media'], DirectoryList::STATIC_VIEW => [DirectoryList::URL_PATH => 'static'], DirectoryList::UPLOAD => [DirectoryList::URL_PATH => 'media/upload'], ]; $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params); /** @var \Magento\Framework\App\Http $app */ $app = $bootstrap->createApplication(\Magento\Framework\App\Http::class); $bootstrap->run($app);