Home >Backend Development >PHP Tutorial >renderforwardredirect difference redirect forward difference pay it forward put forward

renderforwardredirect difference redirect forward difference pay it forward put forward

WBOY
WBOYOriginal
2016-07-29 08:55:071616browse

render

1. Do not specify render

Result: (current models are in the controller)/(current Controller)/(current Action).phtml

2.$this->render('xxx');

Result: (current models are in the controller)/(current Controller)/xxx.phtml

3. Summary

render directly introduces the view file

forward

1.$this->forward('xxx');

Result: (The current models are in the controller)/(Current Controller)/xxxAction

2.$this->forward('xxx','Yyy');

Result: (The current models are in the controller)/ YyyController/xxxAction

3.$this->forward('xxx','Yyy','zzz');

Result: zzz/Yyy/xxxAction

4.t his?>forward (xxx, Yy z , params);Multiple layers$params = array( ‘a’ => ‘1’, ‘b’ => ‘2’ ); Result: /zzz/Yyy/xxx/a/1/b/25. SummaryYou can jump to a certain function in this controller through forward You can also jump to a function in other controllersredirect1.$this->redirect('/xxx');Result:/xxx2.$this->redirect('/xxx /yyy');Result:/xxx/yyy3.$this->redirect('/xxx/yyy/zzz');Result:/xxx/yyy/zzz4.$this ->redirect('http://www.baidu.com');

Result: Jump to Baidu external network


5. Summary

redirect can be redirected to this website or external network

').addClass ('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i

').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the difference between renderforwardredirect, including forward and render aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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