CI Framework code to run the most detailed process (not illegal advertising law bar ~)

Source: Internet
Author: User

Recently in the study CI (3.1.0-DEV) framework source code, while looking at the source, while on GitHub write Chinese notes, Https://github.com/pandancode/CI-note, interested classmates can see.

index.php process: 1, define development mode, debug, develop, Release 2, set system,application directory 3, set default controller (not recommended in index.php settings) 4, set User Configuration 5, check path 6, define path constant 7, load bootstrapper  system/core/codeigniter.php condeigniter.php process: 1, define framework version 2, load the framework defined constants SYSTEM/CONFIG/CONTANTS.PHP3, Load all functions system/core/common.php4, check PHP version is less than 5.4, do compatibility 5, store PHP super variable in $globals array 6, set error, exception, script exit trigger function 7, set subclass prefix 8, If you need to load the component automatically, load the apppath/vendor/autoload.php, or the file path set in the configuration file 9, load benchmark, and log Total_execution_time_start,_base_ Classes_start two time point 10, load hooks, and call Pre_system Hook 11, Load config class, and initialize the instance, according to the home settings configuration, replace the configuration file where item 12, set the default character, and load msstring, Iconv extension 13, check the existence of Mbstring,hash,password,standard class functions (possibly due to version problems, some functions are not defined in the lower version), then redefine the implementation of the function 14, instantiate UTF8, URI, router, Output class 15, cache check, if the cache output is not rewritten, and the caching conditions are satisfied, then directly outputs the cache, exit script 16, initialize security, Input, Lang class 17, load basepath/core/ controller.php controller (late spread) 18, if there is a sub-controller, then load in 19, set _base_classes_end time point 20, check whether the route contact class and method is valid, if invalid, Activate 404 state variable 21, check whether to reset 404, if reset 404, check whether the Reset 404 class and method is valid, if invalid, cancel 404, 22, if 404 is false, the first case is that itself 4,041 is not active, then use the class and method of route parsing, The second resets 404, but the class or method is not valid, the default class and method is used, and no one uses the new class and method to process 40423, if the method is not _remap,Then get the parameter, hooks call Pre_controller Hook 24, record Controller_execution_time_class_method start time, and initialize CLASS25, hooks call Post_ Controller_constructor Hook 26, call the class method, here will call the appropriate controller and method, the method inside the call model to handle business logic (late spread) 27, BM Records Controller_ Execution_time_class_method execution end Point 28, hooks call Post_controller Hook 29, output view 30, hooks call Post_system hook Mother Egg, the process is finally over.

CI Framework code runs the most detailed process (no illegal advertising law ~)

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.