首页 > 学院 > 开发设计 > 正文

Yii redirect方法

2019-11-09 17:25:04
字体:
来源:转载
供稿:网友

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‘);


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表