這篇文章主要介紹yii頁面跳轉(zhuǎn)如何傳值,文中介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們一定要看完!
yii中頁面跳轉(zhuǎn)與傳值:
1、在同一個Controller中頁面跳轉(zhuǎn)
$this->render('view頁面',array('參數(shù)'=>'值')); $this->render('news',array('result'=>'123','result1'=>'456'));
url重定向
$this->redirect(array('action方法')); $this->redirect(array('getnews','id'=>1,,,,));
2、在不同的Controller中頁面跳轉(zhuǎn)
$this->redirect(array('跳轉(zhuǎn)到的controller/跳轉(zhuǎn)到的controller里的action','參數(shù)'=>'值',,,,)); $this->redirect(array('user/getuser','id'=>1));
以上是“yii頁面跳轉(zhuǎn)如何傳值”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!