最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

zend framework重定向方法小結(jié)

 更新時間:2016年05月28日 09:41:51   作者:鷹眼  
這篇文章主要介紹了zend framework重定向方法,總結(jié)歸納了常用的zend framework重定向方法,非常簡單易懂,需要的朋友可以參考下

本文總結(jié)了zend framework重定向的方法。分享給大家供大家參考,具體如下:

一. render

不指定render

結(jié)果: {當前Module}/{當前Controller}/{當前Action}.phtml

$this->render('bar');

結(jié)果: {當前Module}/{當前Controller}/bar.phtml

二. forward

$this->_forward('bar');

結(jié)果: {當前Module}/{當前Controller}/bar

$this->_forward('bar', 'foo');

結(jié)果: {當前Module}/foo/bar

$this->_forward('bar', 'foo', 'hoge');

結(jié)果: hoge/foo/bar

$params = array(
 'a' => '1',
 'b' => '2'
);
$this->_forward('bar', 'foo', 'hoge', $params);

結(jié)果: /hoge/foo/bar/a/1/b/2

三. redirect

$this->_redirect('/hoge');

結(jié)果: /hoge

$this->_redirect('/hoge/foo');

結(jié)果: /hoge/foo

$this->_redirect('/hoge/foo/bar');

結(jié)果: /hoge/foo/bar

$this->_redirect('http://localhost/hoge/foo/bar');

結(jié)果: http://localhost/hoge/foo/bar

$this->_redirect('http://localhost/hoge/foo/bar?a=1&b=2');

結(jié)果: http://localhost/hoge/foo/bar?a=1&b=2

四. 特殊情況

不使用 layout

結(jié)果:

$this->_helper->layout()->disableLayout();

不使用 view

結(jié)果:

$this->_helper->viewRenderer->setNoRender();

更多關(guān)于zend相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《Zend FrameWork框架入門教程》、《php優(yōu)秀開發(fā)框架總結(jié)》、《Yii框架入門及常用技巧總結(jié)》、《ThinkPHP入門教程》、《php面向?qū)ο蟪绦蛟O(shè)計入門教程》、《php+mysql數(shù)據(jù)庫操作入門教程》及《php常見數(shù)據(jù)庫操作技巧匯總

希望本文所述對大家基于Zend Framework框架的PHP程序設(shè)計有所幫助。

相關(guān)文章

最新評論

沁阳市| 遂溪县| 兴山县| 交口县| 泸西县| 德钦县| 都匀市| 疏勒县| 永寿县| 海宁市| 顺平县| 门源| 平武县| 南靖县| 松桃| 全州县| 揭东县| 离岛区| 政和县| 郴州市| 清水县| 丽江市| 清镇市| 碌曲县| 安福县| 报价| 丹阳市| 平江县| 弥渡县| 莫力| 海盐县| 鹤岗市| 莱西市| 云浮市| 平江县| 昌乐县| 射阳县| 兴和县| 北票市| 陆良县| 绵竹市|