>im 尝试在本地创建新模块。 现在检测模块的名称为 IndexController.php
。 该控制器由两个功能组成,分别是 索引操作 和 测试操作 .现在测试操作未被检测到,但索引操作被检测到。IM 使用此链接运行按预期运行的控制器localhost/magentoproject/index.php/test/index
但是当我尝试运行时localhost/magentoproject/index.php/test/test
显示找不到 404。
这是结构索引控制器.php
class Pfay_Test_IndexController extends Mage_Core_Controller_Front_Action {
public function IndexAction() {
$this->loadLayout();
$this->renderLayout();
//echo 'test index';
}
public function testAction() {
echo 'test mymethod';
}
}
这是IM运行localhost/magentoproject/index.php/test/index的时候
这是IM运行本地主机/magentoProject/index.php/test/test
路径
将moduelname/controllername/actionmethod
在您的情况下,模块名称将为test
控制器名称将被index
,操作方法将被test
所以网址将被localhost/magentoproject/index.php/test/index/test