解析错误 PHP 封装在 Magento 模块中的字符串



尝试在本地计算机上注册自定义Magento2模块时收到以下错误:

解析错误:语法错误、意外的"DDF_AdminMenu" (T_CONSTANT_ENCAPSED_STRING(,期望"("在/Users/petey/Desktop/magento/app/code/DDF/AdminMenu/registration.php 在第 5 行

我似乎不明白为什么会出现错误。

我的代码如下:


MagentoFrameworkComponentComponentRegistrar::register(
    MagentoFrameworkComponentComponentRegistrar::MODULE,
    'DDF_AdminMenu',
    __DIR__
);

我知道这似乎很明显,但它发生在我身上

请确保在文件开头添加<?php

相关内容

最新更新