首页 > 其他 > 详细

zend frameword 基本语法

时间:2015-03-31 19:40:52      阅读:154      评论:0      收藏:0      [点我收藏+]

#resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
#resources.frontController.moduleControllerDirectoryName ="controllers"
#resources.frontController.defaultModule ="default"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"

下面测试成功
resources.frontController.controllerDirectory.default =APPLICATION_PATH "/modules/default/controllers"
resources.frontController.controllerDirectory.admin =APPLICATION_PATH "/modules/admin/controllers"
resources.FrontController.moduleDirectory =APPLICATION_PATH "/modules"
resources.FrontController.moduleControllerDirectoryName ="controllers"
resources.FrontController.defaultModule= "default"

下面测试成功

resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

两个都只可以访问default

http://192.168.1.188/zend/public/index/index
http://192.168.1.188/zend/public/admin/index/add

 

.$this->_forward($action,$controller=null,$module=null,array$params=null)
参数要至少写前两个,不然就会报错;
此跳转不会更改浏览器地址;

2.$this->_redirect($url,$options)
$url通常就是‘controller/action‘,至于后面的$options我还没用过;
此跳转会改变浏览器地址;

3.$this->render(‘test‘)或$this->render(‘4-2.php‘)
此跳转会先进到test.phtml页面,再到该控制器下的testAction();
第二种情况就是跳转到对应的页面;

zend frameword 基本语法

原文:http://www.cnblogs.com/vania/p/4381643.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!