YII contoller控制器之间跳转的方法redirect
来源:互联网 发布:plc电路图绘制软件 编辑:程序博客网 时间:2024/06/06 15:04
YII contoller控制器之间跳转的方法redirect
2015-03-12 31418 懒人程序
一个contoller CustomerController里怎么调用另一个controller里的action,Acontoller调用SiteContoller的actionShow($id), url显示上是Customer/index
$control=Yii::app()->runController('site/show/id/2');
不带参数的actionShow()
$control=Yii::app()->runController('site/show');
redirect使用方法
$this->redirect(array('/site/contact','id'=>12));//http://www.kuitao8.com/testwebap/index.php?r=site/contact&id=12$this->redirect(array('site/contact','id'=>'idv','name'=>'namev'));//http://www.kuitao8.com/testwebap/index.php?r=site/contact&id=idv&name=namev$this->redirect(array('site/contact','v1','v2','v3'));//http://www.kuitao8.com/testwebap/index.php?r=site/contact&0=v1&1=v2&2=v3$this->redirect(array('site/contact','v1','v2','v3','#'=>'ttt'));//带anchor的 http://www.kuitao8.com/testwebap/index.php?r=site/contact&0=v1&1=v2&2=v3#ttt
跳转到一个绝对路径
$this->redirect('http://www.baidu.com');
阅读全文
0 0
- YII contoller控制器之间跳转的方法redirect
- YII contoller之间的方法调用 redirect
- YII之 redirect 与contoller之间的方法调用
- SpringMVC 控制器中方法之间的跳转(客户端跳转(redirect)和服务器端跳转(forward))
- yii2.0里的跨控制器跳转redirect跳转方法
- Yii中的redirect跳转
- Yii中的redirect跳转
- 多控制器之间的跳转
- Yii控制器调用其他控制器的方法
- Yii控制器调用其他控制器的方法
- YII路由跳转forward\redirect
- Yii redirect方法
- YII的forward\redirect
- 跳转到控制器的方法
- Yii控制器动作的编写方法
- yii初始化控制器的两种方法
- 控制器与导航控制器及之间的相互跳转
- Yii controller控制器下设置对于用户没有登录的请求跳转至指定URL的方法
- SSM项目关于如何下载图片
- Maven简介和环境变量配置和集成Eclipse
- Imageloader 缓存
- Atom打开一个工程文件不可编辑问题处理
- php瀑布流输出时文字始终在浏览器最底部显示;
- YII contoller控制器之间跳转的方法redirect
- 签名 react-native-signature
- GSM模块启动流程
- Windows netstat查看端口、进程的使用介绍
- Android屏幕适配解决方案
- Java 反射机制
- Linux下安装MySQL
- 浏览器自动刷新网上指定页面的两种方式(我知道的)
- cookie中setPath()和setDomain()的区别