在 Zend Framework 中,我有一个控制器
class TestController extends Zend_Controller_Action
{
public function indexAction()
{
}
public function getResultByID( $id )
{
return $id;
}
}
如何在index.phtml中调用函数getResultByID?
First:
public function indexAction()
{
$this->view->controller = $this
}
在您的视图脚本中:
<html><title><?php echo $this->controller->getResultByID($this->id); ?></title></html>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)