国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 語言 > PHP > 正文

zend framework重定向方法小結

2024-05-04 23:46:48
字體:
來源:轉載
供稿:網友
這篇文章主要介紹了zend framework重定向方法,總結歸納了常用的zend framework重定向方法,非常簡單易懂,需要的朋友可以參考下
 

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

一. render

不指定render

結果: {當前Module}/{當前Controller}/{當前Action}.phtml

$this->render('bar');

結果: {當前Module}/{當前Controller}/bar.phtml

二. forward

$this->_forward('bar');

結果: {當前Module}/{當前Controller}/bar

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

結果: {當前Module}/foo/bar

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

結果: hoge/foo/bar

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

結果: /hoge/foo/bar/a/1/b/2

三. redirect

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

結果: /hoge

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

結果: /hoge/foo

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

結果: /hoge/foo/bar

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

結果: http://localhost/hoge/foo/bar

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

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

四. 特殊情況

不使用 layout

結果:

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

不使用 view

結果:

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


注:相關教程知識閱讀請移步到PHP教程頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

主站蜘蛛池模板: 上高县| 西乡县| 潼南县| 永新县| 新河县| 天水市| 比如县| 简阳市| 武宁县| 阳信县| 岢岚县| 延安市| 滁州市| 瑞昌市| 尖扎县| 台南市| 梓潼县| 山阴县| 荆州市| 海安县| 建昌县| 昌都县| 杭州市| 稷山县| 尼勒克县| 北京市| 海口市| 玉林市| 兴宁市| 分宜县| 鹰潭市| 竹山县| 金昌市| 美姑县| 邢台市| 新余市| 封丘县| 长汀县| 隆子县| 华安县| 边坝县|