Let me tell you about the loading process for this system.
Define the root directory, define the Include directory
Loading core Files
Config file ' config.inc.php '
global function ' global.func.php '
Directory operation function ' dir.func.php '
URL related function ' url.func.php '
Data output related class ' output.class.php '
Permission class ' priv_group.class.php '
Time processing class ' times.class.php '
Load language array ' phpcms.lang.php '
Load several inventory class ' db_mysql.class.php '
Define constants, most of the information we commonly use, such as ip,http_referer,script_name ... Constant with all
Get the variable from $_post,$_get,$_cookie,-> extract
The read Cache,cache_read function is mostly read by some of the array files, and then extract (extract each array don't forget unset)
Get current $mod, default is Phpcms
Determine if the user is logged on
Read member group permissions
To read a template file through the templates function
The cache template PHP file is first read based on the parameters generated
Determine if the file exists and the file is Tpl_root. Tpl_name. ' /'. $module. ' /'. $template. '. Whether the HTML ' build date equals Tpl_cachepath. $module. ' _ '. $template. ' Tpl.php ', otherwise recompile and generate the TPL file
Read the TPL file
The advantages of this CMS is that the program and template separation, the commonly used data through an array of access to the file above, improve the high performance, not every time from the database to read, and then the template, through the self-made syntax function compiled after access to the TPL increased the flexibility of the template, The artwork does not need to know PHP syntax, but also can write the layout flexibly, the tag function is also good.
The downside is that too many unwanted files are loaded in memory at once, especially in the form of variables and arrays, whether or not they are needed.
The highlight is that you can easily generate HTML, make up for the shortcomings, the overall structure and ideas quite good, worth learning and two times development!
The above describes the use of Phpcms template Phpcms summary, including the phpcms template aspects of the content, I hope that the PHP tutorial interested in a friend helpful.