Zend Frameword Basic Syntax

Source: Internet
Author: User

#resources. frontcontroller.moduledirectory = Application_path "/modules"
#resources. Frontcontroller.modulecontrollerdirectoryname = "Controllers"
#resources. Frontcontroller.defaultmodule = "Default"
Resources.frontController.controllerDirectory = Application_path "/controllers"

Test success Below
Resources.frontController.controllerDirectory.default =application_path "/modules/default/controllers"
Resources.frontController.controllerDirectory.admin =application_path "/modules/admin/controllers"
Resources. Frontcontroller.moduledirectory =application_path "/modules"
Resources. Frontcontroller.modulecontrollerdirectoryname = "Controllers"
Resources. frontcontroller.defaultmodule= "Default"

Test success Below

Resources.frontController.controllerDirectory = Application_path "/controllers"
resources.frontController.params.displayExceptions = 0
Resources.frontController.moduleDirectory = Application_path "/modules"

Two can only access the default

Http://192.168.1.188/zend/public/index/index
Http://192.168.1.188/zend/public/admin/index/add

. $this->_forward ($action, $controller =null, $module =null,array$params=null)
The parameter must write at least two first, otherwise will error;
This jump does not change the browser address;

2. $this->_redirect ($url, $options)
$url is usually ' controller/action ', as for the back of the $options I have not used;
This jump transfer changes the browser address;

3. $this->render (' test ') or $this->render (' 4-2.php ')
This jump transfer advanced to the Test.phtml page, and then to the controller under the Testaction ();
The second case is to jump to the corresponding page;

Zend Frameword Basic Syntax

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.