Phpcms V9 Note 1

Source: Internet
Author: User

Phpcms V9 Loading Sequence

Compared with V8, phpcms V9 has the same overall direction of thinking. The difference is that V9 combines OOP and MVC more perfectly.

Open index. php In the root directory.Code, Which is clearer than V8 index. php,

Base under phpcms. PHP file is a basic class with functions similar to V8 common. inc. the difference between PHP is that it can directly call all common functions of the loading system class, application class, data model, system function, application function, and configuration file through pc_base:

For example, pc_base: load_sys_func ('global ')

Is to load the system function library, include the file libs \ functions \ global. func. PHP, _ load_func uses two parameters. If the second parameter is not empty, the include path is $ path \ global. func. PHP

Pc_base: load_config ('system', 'errorlog ')

Is to load the configuration file, include cache_path/configs/system. php, and then read whether there is a key value named errorlog

Pc_base: load_sys_class ('application ')

Is to load the system class method, include libs/classes/application. class. PHP is instantiated by default. It is instantiated into the classes array. In this method, if you have your own extension class (phpcms \ libs \ Classes \ my_application.class.php ), it is automatically loaded and instantiated.

In the constructor of the application class, include libs/classes/Param. class. PHP, load pc_base: load_config ('route ', 'default'), directly obtain the default MVA, and then execute init, load_controller (load Controller) to load through Param. class. configure the Controller in PHP, and then initialize the init event in the Controller.

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.