zend framework一个模块多个控制器的有关问题

WBOY
Release: 2016-06-13 13:39:07
Original
957 people have browsed it

zend framework一个模块多个控制器的问题
新手,嘎嘎新。
我现在做的一个模块,但是我想根据业务把控制器分开(不想把所有的Actoin都写到IndexController里),于是我又在IndexController的目录下建了个WorkController,在/views\scripts\下建了个work文件夹,这样做可以吗?这种情况用共同的layout类里的属性好像有问题,是不是需要设么特殊的设定呀?请过来人指点一下。比如需要注意的地方,需要特殊设定的路径什么的,最好谁有Zend框架比较全面的例子给小弟个,不胜感激。。。

邮箱ryueiketu@gmail.com

------解决方案--------------------
配置文件/application/configs/application.ini
 
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"

layout文件存放位置
/application/layouts/scripts/layout.phtml
内容
---


layout()->content; ?>

---


即可

 
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