renderforwardredirect区别 redirect forward区别 pay it forward put forwar
1.不指定render
结果:(当前models即controller内)/(当前Controller)/(当前Action).phtml
2.$this->render(‘xxx’);
结果:(当前models即controller内)/(当前Controller)/xxx.phtml
3.总结
render直接引入视图文件
forward
1.$this->forward(‘xxx’);
结果:(当前models即controller内)/(当前Controller)/xxxAction
2.$this->forward(‘xxx’,’Yyy’);
结果:(当前models即controller内)/YyyController/xxxAction
3.$this->forward(‘xxx’,’Yyy’,’zzz’);
结果:zzz/Yyy/xxxAction
4.
$params = array(
‘a’ => ‘1’,
‘b’ => ‘2’
);
结果:/zzz/Yyy/xxx/a/1/b/2
5.总结
通过forward可以跳转到本控制器那某函数
也可跳转到其他控制器某函数
redirect
1.$this->redirect(‘/xxx’);
结果:/xxx
2.$this->redirect(‘/xxx/yyy’);
结果:/xxx/yyy
3.$this->redirect(‘/xxx/yyy/zzz’);
结果:/xxx/yyy/zzz
4.$this->redirect(‘http://www.baidu.com‘);
结果:跳转至百度外网
5.总结
redirect 可以转向到本网站或外网
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });以上就介绍了render\forward\redirect区别,包括了forward,render方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
推荐阅读
-
forward和redirect的区别
-
SERVLET API中forward()与redirect()的区别
-
forward:hello 与 redirect:hello的区别
-
forward(转发)与redirect(重定向)的区别
-
forward和redirect的区别
-
forward和redirect的区别
-
Servlet API中forward() 与redirect()的区别
-
Servlet API中forward() 与redirect()的区别
-
renderforwardredirect区别 redirect forward区别 pay it forward put forwar
-
renderforwardredirect区别 redirect forward区别 pay it forward put forwar