ZENDFRAMEWORK2 Source Analysis index.php

Source: Internet
Author: User

1<?PHP2 /**3 * This makes we easier when dealing with paths. Everything is relative4 * to the application root now.5  */6 chdir(dirname(__dir__)); //Toggle current directory to Active Directory 7 8 //decline static file requests back to the PHP built-in webserver9 if(Php_sapi_name() = = = ' Cli-server ' &&Is_file(__dir__.Parse_url($_server[' Request_uri '],Php_url_path)) {
    //intercept access to other static files in the current directory
Ten return false; One } A - //Setup autoloading - require' Init_autoloader.php '; //Initialize load the - //Run the application! -Zend\mvc\application::init (require' config/application.config.php ')->run ();//Initialize complete application framework to start running

Summary: index.php is the original version of the installation, without any modification, the content is simple, automatically loaded to the application framework to do the pre-run preparation, and then use the Application:init () mode to initialize, init parameters are introduced in the configuration directory application.config.php the application configuration file, the run () method runs the framework after initialization is complete.

ZENDFRAMEWORK2 Source Analysis index.php

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.