Home > Backend Development > PHP Tutorial > php Controller方法最后如何跳转到指定的路径

php Controller方法最后如何跳转到指定的路径

WBOY
Release: 2016-06-13 11:59:01
Original
1869 people have browsed it

php Controller方法最后怎么跳转到指定的路径?

------解决方案--------------------
你 $this->display(); 没有参数,通常就会使用与方法名相符的模板,即 view/modify_photo.html
如果你需要使用其他模板,则需要自行指定
------解决方案--------------------
$this->display();里面应该有参数的,是你想要指定模板的路径,默认的应该是当前方法名的模板
------解决方案--------------------
如果为空代表是当前方法名的模板,如果要指定其他控制器的其他方法名的模板。    $this->display('控制器名:方法名'); 

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