Smarty Şablon Motoru ve Gzip kodlama

0 Cevap php

Ben smarty, Zend ve gzip kodlama ile biraz sorun var, ben smarty sınıf uzanır

//This method i call in one front controller plugin
$this->getResponse()->setHeader('Content-Encoding' , 'gzip');

View extends Zend_View_Abstract implements Zend_View_Interface {

   public $_smarty;

   public function __construct(){

      $this->_smarty = new Smarty();
      //Hire i have some smarty options paths and etc.
      //------------------
      //I register this object to smarty template
      $this->_smarty->registerObject('Smarty', $this);

      //You can see this pulugin at this address
      //http://smarty.incutio.com/?page=GZipPlugin
      $this->_smarty->loadFilter('output', 'gzip');

   }


   public function Fetch($tpl){
      retutn $this->_smarty->fetch($tpl);
   }

   //Zend call this method after loaded controller and display active controller tpl
   public function Render($tpl){
      retutn $this->_smarty->display($tpl);
   }

   public function Header($params, &$smarty){
      $this->_smarty->display('header.tpl');
   }


}

Ok... in my index.tpl i call the function {Site->header} and my browser chrome throw the error:

Server error.

The website encountered an error while retrieving http://site.dev. It may be down for maintenance or configured incorrectly.

Ben gibi alişverişine yüklemek için denedim:

echo $this->_smarty->fetch('header.tpl');

ben dışarı fillter sitesi çalışırken koymak kaldırdığınızda ama, aynı hata var.

If anyone can help me I would been greatly appreciate it. Sorry if my english is not very good. Thanks in advance.

0 Cevap