i try render template function:
public function renderlasteinsatz($lasteinsatz) { zend_loader::loadclass('zend_view'); $view = new zend_view(); $view->headline = "letzter einsatz"; $view->datum = $lasteinsatz->getdatum(); $view->ort = $lasteinsatz->getort(); $view->bemerkung = $lasteinsatz->getbemerkung(); $view->setscriptpath('/library/feuerwehr/templates'); return $view->render('indexartikel.phtml'); }
my folder is: www/ htdocs/index.php library/feuerwehr /templates library/zend
i set in index.php include path libraries und try use render function error code:
fatal error: uncaught exception 'zend_view_exception' message 'script 'indexartikel.phtml' not found in path (/library/feuerwehr/templates/)' in /var/library/zend/view/abstract.php on line 988 ( ! ) zend_view_exception: script 'indexartikel.phtml' not found in path (/library/feuerwehr/templates/) in /var/library/zend/view/abstract.php on line 988
all files there , can't find solution google, u know answer?
script path not valid.
change to:
$view->setscriptpath('/var/library/feuerwehr/templates');
or
$view->setscriptpath('../library/feuerwehr/templates');
Comments
Post a Comment