即时通讯尝试在本地创建新模块。现在该模块被检测到,其名称为IndexController.php
。该控制器由两个功能组成,即indexAction和testAction。 现在testAction未被检测到,但indexAction被检测到。 即时通讯使用此链接运行控制器localhost/magentoproject/index.php/test/index
这是按预期方式运行 但当我尝试运行localhost/magentoproject/index.php/test/test
是显示404未找到。如何在magento中的相同控制器中使用其他功能?
这是结构 indexController.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';
}
}
this is when im run localhost/magentoproject/index.php/test/index
this is when im run localhost/magentoproject/index.php/test/test
尝试与地方'模具()''后回声 '测试的MyMethod';' – urfusion