Home > Backend Development > PHP Tutorial > phpcms template PHPCMS usage summary

phpcms template PHPCMS usage summary

WBOY
Release: 2016-07-29 08:43:48
Original
1416 people have browsed it

Let me talk about the loading process of this system
Define the root directory, 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'
Loading Language array 'phpcms.lang.php'
Load the database class 'db_mysql.class.php'
Define constants, most of our commonly used information such as IP, HTTP_REFERER, SCRIPT_NAME... always use constants
Get variables from $_POST ,$_GET,$_COOKIE,-> extract
Read CACHE, cache_read function mostly reads some array files, and then extract (don’t forget to unset each array when extracting)
Get the current $mod, the default is PHPCMS
Determine whether the user is logged in
Read the member group permissions
Read the template file, through the template function
First, it will read the cache template php file generated based on the parameters
Determine whether the file exists and the file TPL_ROOT.TPL_NAME.'/'. Whether the $module.'/'.$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 through the built-in Syntax functions are compiled and accessed to increase 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!

The above has introduced a summary of the use of phpcms template PHPCMS, including the content of phpcms template. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template