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

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

WBOY
WBOYOriginal
2016-06-13 09:58:42858browse

初用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……
Statement:
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