Next I will talk about the loading process of this system.
Define the root directory and include directory
Load core files
Configuration File 'config. Inc. php'
Global function 'Global. func. php'
Directory operation function 'dir. func. php'
URL-related functions 'url. func. php'
Data output class 'output. Class. php'
Permission class 'Priv _ group. Class. php'
Time Processing class 'times. Class. php'
Load the language array 'phpcms. Lang. php'
Load data inventory class 'db _ mysql. Class. php'
Defines constants. For most of our commonly used information, such as IP, http_referer, and script_name... constants are used.
Get the variable from $ _ post, $ _ Get, $ _ cookie,-> extract
Read cache. Most of cache_read functions read some array files, and then extract (do not forget unset for each array of extract)
Get the current $ mod. The default value is phpcms.
Determine whether a user is logged on
Read member group permissions
Read the template file and use the template function
First, the PHP file of the cache template is generated based on parameters.
Determine whether the file exists and the file tpl_root.tpl_name. '/'. $ module. '/'.w.template.'.html' Whether the generated date is equal to tpl_cachepath. $ module. '_'. $ template. '. TPL. php'. Otherwise, recompile and generate the TPL file.
Read TPL files
The advantage of this CMS is thatProgramSeparated from the template, the commonly used data is stored in the file in the form of arrays, which improves the performance and does not need to be read from the database every time, the built-in syntax function adds the template flexibility for TPL after compilation and access. The artist can also flexibly write the layout without understanding the PHP syntax. the built-in tag function is also good.
The disadvantage is that too many unnecessary files are loaded in the memory at a time, especially in the form of variables and arrays, regardless of whether they are used or not.
The highlight is that HTML can be easily generated to make up for the shortcomings. In general, the architecture and ideas are quite good and worth learning and secondary development!