PHPCMS is developed in the MVC design mode and accessed through modules and operations. It uses a single portal mode for project deployment and access, regardless of the access to any module or function, there is only one unified portal.
The portal program is the Bootstrap program that processes user requests in the early stage. It is the only one that can be directly requested by the end user to run.
PHPCMS framework entry file base. php:
File Path: root directory/phpcms/base. php code snippet:
This file is the framework entry file, including instantiation system/module class methods, Calling System/module methods, and common system constants. For example:
Pc_base: load_model ('* _ model') load database model class
Pc_base: load_sys_class ('classname') instantiate the system class
Pc_base: load_app_class ('classname', 'admin') instantiate the module class
Pc_base: load_sys_func ('funcfile ') Call the system function library
Pc_base: load_sys_func ('global', 'test'); // load the module function library (call the global function package of the test Module)
Instantiate an application
File Path: root directory/index. php
This code first loads the phpcms Framework's boot file base. php, and then calls its static method creat_app () to create and run a Web application instance based on the specified configuration file.
Database Configuration File database. php call
File Path: root directory/caches/configs/database. php
This code first uses pc_base: load_app_func () to load the index module's custom function library global. func. php. func. php UDF. Use the pc_base: load_config () Static Method to load the database configuration file database of phpcms. php to get the configuration information of the database, so that you can get rid of the limitations of the PHPCMS framework and use the original PHP mysql for secondary development.
Instantiate a module class
This Code uses the pc_base: load_app_class () method to instantiate the admin. class of the admin module.
From this we know that, whether we call the system class or function library in the PHPCMS framework or call a custom module class or function library, we can all go to the base. php to find the call method, so the second development of PHPCMS, find out the base. static Methods in php are crucial.