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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:53:28
Original
1056 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
Latest Issues
Controller does not exist: app\controller\Test
From 1970-01-01 08:00:00
0
0
0
Controller touch?
From 1970-01-01 08:00:00
0
0
0
AngularJS via controller A to controller B
From 1970-01-01 08:00:00
0
0
0
Imitate $this->show() in TP5 Controller
From 1970-01-01 08:00:00
0
0
0
ControllerClass 'think\Controller' not found in
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template