Home  >  Article  >  Backend Development  >  Summary of the use of PHPCMS_PHP tutorial

Summary of the use of PHPCMS_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:34:49988browse

Next, I will talk about the loading process of this system

Define the root directory and define the include directory
Load the core file
Configuration 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 database class 'db_mysql.class.php'
Definition Constants, most of our commonly used information such as IP, HTTP_REFERER, SCRIPT_NAME... always use constants
to obtain variables, and read CACHE from $_POST, $_GET, $_COOKIE, -> extract
. The cache_read function is large Part of it is to read some array files, and then extract (extract each array, don’t forget to unset)
Get the current $mod, the default is PHPCMS
Determine whether the user is logged in
Read member group permissions
Read the template file, through the template function
First, it will read the cache template php file generated according to the parameters
To determine whether the file exists and the file TPL_ROOT.TPL_NAME.'/'.$module.'/'. Whether the $template.'.html' generation date is equal to TPL_CACHEPATH.$module.'_'.$template.'.tpl.php', otherwise recompile and generate the tpl file
Read the tpl file


The advantage of this CMS is that the program is separated from the template. Commonly used data are stored in files in the form of arrays, which improves performance. There is no need to read from the database every time, and then the template is used. The built-in syntax function is compiled and stored, which increases the flexibility of templates for tpl. Artists can write layouts flexibly without knowing PHP syntax; the built-in TAG function is also good.

The disadvantage is that too many unnecessary files are loaded into the memory at one time, especially in the form of variables and arrays, regardless of whether they are used or not.

The highlight is that it can easily generate HTML, which makes up for the shortcomings. Generally speaking, the structure and ideas are quite good, and it is worth learning and secondary development!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/322384.htmlTechArticleLet me talk about the loading process of this system. Define the root directory and define the include directory to load the core file configuration file' config.inc.php' global function 'global.func.php' directory operation function...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn