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

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

WBOY
WBOYOriginal
2016-06-13 11:59:011816browse

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

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

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