PHPCMS Program Two development records

Source: Internet
Author: User

1. phpcms/base.php in the Pc_base class static class, the main load of each file used.
2. Pc_base in Load_sys_func and other functions with SYS, the basic is to load Lib under the file. Func load functions under the class load class
3. pc_base function in general the first parameter is the file name, the second parameter is the path, the 3rd parameter has a general: whether the loading class is manifested
4. Load_app at the beginning of the pc_base is loaded modules under the functions and class, etc.
5. Website start entry controller phpcms/libs/classes/application.class.php. The init () method detects the function name of the parameter. Default rule/caches/configs/route.php definition
6. Default execution:/phpcms/modules/content/index.php->init ()
7. Default execution Module Database call:/phpcms/model/content_model.class.php loading System/phpcms/libs/classes/model.class.php
8./phpcms/libs/classes/db_factory.class.php database connection factory; Handle connection that database default parameter configuration/cache/configs/database.php
9. db_factory.class.php Connect () returns the specific database operation class entity by default: phpcms/libs/classes/mysql.class.php
/phpcms/libs/classes/model.class.php Default Connection Database $db _setting parameter setting is called in "8"
11.model.cass.php $db get the database connection; This class also has the basic operation of the database processing, the specific database operation using "9" returned entity class operations
12. system core function file/phpcms/libs/functions/global.func.php main actions are: GetCache and template
13.getcache, call the cache profile/caches/configs/cache.php default to: File type
14.getcache call to the cache system control class: cache_factory.class.php; Default is the file type cache file parameter called the cache specific system processing class: Cache_file.class.php Get method to get specific cachename corresponding to the file return array
15.getcache Specific parameter description: The first parameter is the cache file name, the second parameter is the cache directory parameter and the cache default call path is Caches_data such as:/caches/caches_ second parameter/caches_data/ The first parameter file name. cache.php
16.setcache background processing or installation of the system generated mainly based on the database table cache records exist to determine the operation, the presence of updates, does not exist to add, file operations with the database table
17.template Template module name, call the file name, call the template name (default) template system Processing class:/phpcms/libs/classes/template_cache.class.php main call Template_ Compile parsing templates and replacing templates
18.template_cache.class.php call Template_parse to replace the label in the template
19. In the template, the label is mainly PC: type name template_cache.class.php uses Pc_tag to parse the PC: type name, action in the tag is the function name, the type name is called the label Processing class names, the remaining tag attributes are parameters, The generally loaded processing class is the tag class under the module classes, such as:/content/classe/content_tag.class.php; When the type name is (' JSON ', ' xml ', ' block ', ' get '), special parsing

Special Note:
base.php in Parameters or change parameter settings to background-change
//define site root path
define (' Web_path ', pc_base::load_config (' System ', ' Web_path '));
//js Path
define (' Js_path ', pc_base::load_config (' System ', ' Js_path '));
CSS path
define (' Css_path ', pc_base::load_config (' System ', ' Css_path '));
IMG Path
Define (' Img_path ', pc_base::load_config (' System ', ' Img_path '));
Dynamic Program Path
define (' App_path ', pc_base::load_config (' System ', ' App_path '));
Define the parameters with the domain name, so change the domain name need to change these parameters/caches/configs/system.php
' js_path ' = ' http://www.xxx.com/statics/js/',//cdn JS
' css_path ' = ' http://www.xxx.com/statics/css/',//cdn css
' img_path ' = ' http://www.xxx.com/statics/' Images/',//cdn img
' app_path ' = ' http://www.xxx.com/',//Dynamic Domain name configuration address

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.