Home> PHP Framework> YII> body text

How to transfer value when yii page jumps

Release: 2019-12-17 15:40:03
Original
2113 people have browsed it

How to transfer value when yii page jumps

Page jump and value transfer in yii:

1. Page jump in the same Controller

$this->render('view页面',array('参数'=>'值')); $this->render('news',array('result'=>'123','result1'=>'456'));
Copy after login

url redirection

$this->redirect(array('action方法')); $this->redirect(array('getnews','id'=>1,,,,));
Copy after login

2. Page jump in different Controllers

$this->redirect(array('跳转到的controller/跳转到的controller里的action','参数'=>'值',,,,)); $this->redirect(array('user/getuser','id'=>1));
Copy after login

PHP Chinese website has a large number of freeYii introductory tutorials, everyone is welcome to learn!

The above is the detailed content of How to transfer value when yii page jumps. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
yii
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!