首页 > 代码库 > Yii中的页面跳转与传值
Yii中的页面跳转与传值
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中的页面跳转与传值
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。