你看看Zend_Controller_Action的代码,
如果想要使用Smarty的话,需要继承一个Zend_Controller_Action的子类,
把View操作都封装起来。

解决方案 »

  1.   

    先回楼上的
    应该是使用Zend_View_Interface接口而不是继承某个类
    但如果想省事或者其他的目的可以同时继承SmartyLZ的错误原因大部分是Zend_Controller_Front::setControllerDirectory()这个方法使用错误或者是根本没使用既然不用Zend_View那就什么都不要用了 包括Zend_Layout俺还是劝LZ 要接受改变 模板技术过时了 难道你不觉得用PHP来模拟PHP很多余么 而且学习Smartyt同样需要时间
    用好Zend_Vier_Helper把很多常用的东西都封装好 模板本身会很简洁
      

  2.   

    $frontController->setParam('noViewRenderer', true);不用view就可以了index.php里面加上
    //smartyinclude "Smarty/libs/Smarty.class.php";
    $smarty = new Smarty();$smarty->template_dir='./application/views/templates'; 
    $smarty->compile_dir='./application/views/templates_c';$smarty->left_delimiter  =  '{<';
    $smarty->right_delimiter  =  '>}';Zend_Registry::set('smarty',$smarty);这样就可以用了需要用到smarty的地方$smarty = Zend_Registry::get('smarty');
      

  3.   


    公司用的smarty 我也是没办法 集成好了 集成了view的抽象类 解决!