Differences between render, _ forward, and _ redirect in ZendFrame
Source: Internet
Author: User
Differentiate render_forward, _ redirectrender: you can only jump to the page under the current controller module without specifying render, specify the corresponding function name file render (& amp; 39; OK & amp; 39;) indicates the okphtml file in the current module _ forward: you can distinguish between render _ forward and _ redirect render: you can only jump to the page under the current controller module without specifying a render. the specified function name file render ('OK') under the current controller indicates OK in the current module. phtml file _ forward: you can jump to the page of another controller (you cannot jump to another website) such as $ this-> _ forward ('err'); this is similar... controller/err $ this-> _ forward ('err', 'global'); that is, GlobalController/err _ redirect: you can jump to the Internet $ this-> _ reditect ('/hahaha'); to the haha controller $ this-> _ redirect ('Haha/test '); jump to the test method of haha controller $ this-> _ redirect ('http: // www.baidu.com '); jump to Internet 1: determine the path: relatively faster (reference some class files) 2: Some resource files should be placed in the public folder (for example, css js image)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.