即時通訊嘗試在本地創建新模塊。現在該模塊被檢測到,其名稱爲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