1

これは app/etc/modules/My_Test.xml にあるアクティベーション ファイルです。

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <My_Test>
            <active>true</active>
            <codePool>local</codePool>
        </My_Test>
    </modules>
</config>

これは app/code/local/MY/Test/etc/config.xml にある私の設定ファイルです

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <global>

        <helpers>
            <my_test>
                <class>My_Test_Helper</class>
            </my_test>
        </helpers>
        <models>
            <mytest>
                <class>My_Test_Model</class>
            </my_test>
        </models>
        <blocks>
            <my_test>
                <class>My_Test_Block</class>
            </my_test>
        </blocks>
    </global>

    <frontend>
        <routers>
            <my_test>
                <use>standard</use>
                <args>
                    <module>My_Test</module>
                    <frontName>test</frontName>
                </args>
            </my_test>
        </routers>
    </frontend>

</config>

これは、app/core/local/My/Test/controllers/IndexController.php のコントローラー コードです。

<?php
class My_Test_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        echo "This is the Module MyTest";
    }
}

今、私がURLを与えているとき/テスト/

404エラーが表示されます

4

2 に答える 2

1

app/core/local/My/Test/controllers/IndexController.php次のように配置する必要があるときに、コントローラーが配置されていると言います。app/code/local/My/Test/controllers/IndexController.php

于 2012-09-19T06:36:22.880 に答える
0

私も同じ問題を抱えていましたが、私の場合はファイルのアクセス許可に関するものでした。ファイルとディレクトリに適切なアクセス許可があることを確認してください。そうでない場合、magento はそれらのファイルを読み取ることができません。

于 2015-08-05T19:53:55.280 に答える