Home > Backend Development > PHP Tutorial > zend framework解决思路

zend framework解决思路

WBOY
Release: 2016-06-13 13:00:40
Original
787 people have browsed it

zend framework
用zf怎样将网页分为header footer之类模块呢,求大神相教
------解决方案--------------------

 


用Zend_Layout 
http://framework.zend.com/manual/en/zend.layout.quickstart.html
http://framework.zend.com/manual/zh/learning.layout.usage.html


也可以用 $this->partial在视图脚本里包含指定的phtml页面: 

= $this->partial('partial.phtml', array(
    'from' => 'Team Framework',
    'subject' => 'view partials')); ?>
------解决方案--------------------
个人知道的有两种方法,一种是layout,把header和footer的东西写在layout里,另一种是比较老的方法,是在视图里直接render,也就是在.phtml文件里用$this->render('header.phtml');

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template