我按照這個tutorial創建簡單的報表模塊。當我嘗試打開Magento的模塊管理控制器返回404錯誤
我得到404 error.Any幫助將不勝感激。這就是我所做的
應用程序的/ etc /模塊/ Package_Custom.xml
<?xml version="1.0"?>
<config>
<modules>
<Package_Custom>
<active>true</active>
<codePool>local</codePool>
</Package_Custom>
</modules>
</config>
應用程序/代碼/本地/包裝/自定義/控制器/ Adminhtml /報告/ ExampleController.php
<?php
class Package_Custom_Adminhtml_Report_ExampleController extends Mage_Adminhtml_Controller_Action
{
public function _initAction()
{
$this->loadLayout()->_addBreadcrumb(Mage::helper('custom')->__('Custom'),Mage::helper('custom')->__('Custom'));
return $this;
}
}
?>
應用程序/代碼/本地/包裝/自定義的/ etc/adminhtml.xml
<?xml version="1.0"?>
<config>
<menu>
<custom translate="title" module="custom">
<title>Custom</title>
<sort_order>15</sort_order>
<children>
<simple translate="title" module="custom">
<title>Simple Report<</title>
<sort_order>1</sort_order>
<action>adminhtml/report_example/simple</action>
</simple>
</children>
</custom>
</menu>
應用程序/代碼/本地/包裝/自定義的/ etc/config.xml中
<?xml version="1.0"?>
<config>
<modules>
<Package_Custom>
<version>1.0.0</version>
</Package_Custom>
</modules>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<custom before="Mage_Adminhtml">Package_Custom_Adminhtml</custom>
</modules>
</args>
</adminhtml>
</routers>
</admin>
</config>
你可以參考這篇文章! [此處輸入鏈路描述] [1] [1]:http://stackoverflow.com/questions/16468668/magento-404-admin-page-login/18110317#18110317 – Modulesoft