要在示例沙盒脚本中初始化Adobe Commerce 2应用程序,请从Adobe Commerce根目录执行以下脚本:
<?php error_reporting(E_ALL | E_STRICT); ini_set('display_errors', 1); require __DIR__ . '/app/bootstrap.php'; $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); $objectManager = $bootstrap->getObjectManager(); //$model = $objectManager->get('Vendor\Module\Some\Model');