Home > Backend Development > PHP Tutorial > 初用ZF的一点疑问,该如何解决

初用ZF的一点疑问,该如何解决

WBOY
Release: 2016-06-13 09:58:42
Original
860 people have browsed it

初用ZF的一点疑问
controller是写php语句的,view是html代码,model是数据库处理语句
但是发现controller和view都能写php ,那么哪些应该分在controller哪些又写在view里呢

------解决方案--------------------
controller里边是逻辑处理部分。

view里边是数据展示部分。
------解决方案--------------------

探讨

但我写了一段controller
PHP code
$base_dir="/var/www/";
$fso=opendir($base_dir);
while($flist=readdir($fso)){
$this->view->flist = $flist;
}
closedir($fso);
echo $this->vie……
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