1
class AboutController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
$this->getResponse()
->appendBody(' hello from aboutAction');
$this->_forward('nothing','index', null, array('email' => '[email protected]'));
}
public function contactAction()
{
$this->view->pageTitle="boolbool";
}
}
該指數操作調用任何控制器的指數函數:Zend框架控制器停止工作
class NothingController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
$email=$this->_getParam('email','not found');
$this->getResponse->appendBody('The email is: '.$email);
}
}
但空話指數動作永遠不會triggered..I獲得關於頁面instead..why頁面未找到?
我不能甚至訪問我沒什麼控制器,即使它在大約沿着文件存在(我可以觸發有關的動作,雖然)
問題在這裏..在控制器索引內的兩個函數:$ email = $ this - > _ getParam('email','not found'); $ this-> getResponse-> appendBody('電子郵件是:'。$ email); – 2011-12-14 16:21:56