Yii中的页面跳转与传值
2015-09-09 18:07
531 查看
1、在同一个Controller中页面跳转:
2、在不同的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));
相关文章推荐
- LayoutParams 简单理解
- PHP二分查找
- PHP中file_exists与is_file,is_dir的区别
- php断点调试的几种方法
- YII路径的用法总结
- 3. PHP 细节
- PHP&正则表达式
- php引用计数与变量引用
- rtp 报头的大小端 可查看jrtplib 中的定义
- php代码优化
- php断点调试--安装xdebug
- 【ThinkPHP】修改ThinkPHP3.1.x成功与失败的跳转页面
- php导出excel
- PHP输入流php://input
- PHP相等的问题
- php的mysql_connect连接遇到的2006问题
- FlowLayoutPanel控件
- 烂泥:Server-U FTP与AD完美集成方案详解
- PHP 5.3以上版本推荐使用mysqlnd驱动
- 在dos命令窗口远程修改自己的FTP密码