第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

Magento 2 新模塊路由未找到

Magento 2 新模塊路由未找到

PHP
MMTTMM 2023-07-15 10:24:20
我遇到一個(gè)問(wèn)題,當(dāng)我嘗試瀏覽新模塊時(shí)找不到它。這是代碼的詳細(xì)信息。Ced/CsTermsAndServices/etc/Module.xml<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">    <module name="Ced_TermsAndServices" setup_version="1.0.0">    </module></config>Ced/CsTermsAndServices/registration.php<?PHP \Magento\Framework\Component\ComponentRegistrar::register(        \Magento\Framework\Component\ComponentRegistrar::MODULE,        'Ced_TermsAndServices',        __DIR__    );Ced/CsTermsAndServices/etc/frontend/routes.xml<?xml version="1.0" ?><config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">    <router id="standard">        <route frontName="cstermsandservices" id="cstermsandservices">            <module name="Ced_TermsAndServices"/>        </route>    </router></config>Ced/CsTermsAndServices/Controller/Index/Index.php<?phpnamespace Ced\CsTermsAndServices\Controller\Index;class Index extends \Magento\Framework\App\Action\Action{    protected $_pageFactory;    public function __construct(        \Magento\Framework\App\Action\Context $context,        \Magento\Framework\View\Result\PageFactory $pageFactory)    {        $this->_pageFactory = $pageFactory;        return parent::__construct($context);    }    public function execute()    {        echo "Hello World";        exit;    }}預(yù)期的路線(xiàn)應(yīng)該是 http://localhost/cstermsandservices/index/index但結(jié)果卻是404 not found。有什么解決辦法嗎?
查看完整描述

1 回答

?
蕪湖不蕪

TA貢獻(xiàn)1796條經(jīng)驗(yàn) 獲得超7個(gè)贊

1)確保遵循供應(yīng)商/模塊名稱(chēng)供應(yīng)商模塊名稱(chēng)約定(在您的情況下,如果您想遵循當(dāng)前目錄結(jié)構(gòu),模塊名稱(chēng)應(yīng)為Ced_CsTermsAndServices)2)module.xml文件名應(yīng)全部小寫(xiě)

希望這能成功 Magento 快樂(lè)


查看完整回答
反對(duì) 回復(fù) 2023-07-15
  • 1 回答
  • 0 關(guān)注
  • 133 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)