Phpcms usage Summary

Source: Internet
Author: User

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!

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.