首页 > 其他 > 详细

Yii中的页面跳转与传值

时间:2014-09-03 11:00:16      阅读:256      评论:0      收藏:0      [点我收藏+]

1、在同一个Controller中页面跳转

      $this->render(‘view页面‘,array(‘参数‘=>‘值‘));

      $this->render(‘news‘,array(‘result‘=>‘123‘,‘result1‘=>‘456‘));

      url重定向   $this->redirect(array(‘action方法‘));

      $this->redirect(array(‘getnews‘,‘id‘=>1,,,,));

2、在不同的Controller中页面跳转

      $this->redirect(array(‘跳转到的controller/跳转到的controller里的action‘,‘参数‘=>‘值‘,,,,));

      $this->redirect(array(‘user/getuser‘,‘id‘=>1));

Yii中的页面跳转与传值

原文:http://www.cnblogs.com/bigpowerlz/p/3953056.html

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