Summary of Use of phpcms template Phpcms

Source: Internet
Author: User
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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.