我有一個控制器IndexController.php其中動作是這樣的如何從獨立的php文件調用zend控制器操作?
class IndexController extends CustomControllerAction {
public function preDispatch() {
if (!$this->view->authenticated) {
$this->_redirect('/users/login');
}
}
public function indexemailAction() {
//somecode which calculates certain things
}
}
現在,我需要調用IndexController.php內的行動「indexmailAction」一個獨立的PHP文件
php文件是indextest.php
<?php
//Need to write some code to call indexmailAction in IndexController.php
?>
我應該在這個文件寫......
在此先感謝
您創建幫助程序並將其稱爲任何地方 – 2013-03-20 04:48:48
「獨立php文件」是什麼意思?一個模型 ?一個看法 ?另一控制器?或者它甚至不在同一個應用程序中? – redmoon7777 2013-03-20 04:53:59