Home > Backend Development > PHP Tutorial > YII ACTION jump_PHP tutorial

YII ACTION jump_PHP tutorial

WBOY
Release: 2016-07-13 17:52:55
Original
1124 people have browsed it

I tried two methods:


Use in action:

$this->render('view',array(
'model'=>$post,
'param1'=>$param1,
'param2'=>$param2,
));

But this just opens the view of another action.

Observe the rul address, the name of the action has not changed.

A very bad thing about this method is that if this method comes from GET or POST,

If there is GET or POST information,

When refreshing the screen, it will GET or POST again, and the content may change.


Another way is to use: www.2cto.com

$this->redirect(array('view','id'=>$model->id));
This method is a real switching action and will not generate another POST or GET.

Author: georgelife7

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478090.htmlTechArticleI have tried two methods: Use in action: $this-render(view,array( model=$ post, param1=$param1, param2=$param2, )); But this just opens the view of another action. ...
Related labels:
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template