码迷,mamicode.com
首页 > Web开发 > 详细

phpcms程序二次开发记录

时间:2014-06-29 00:47:37      阅读:321      评论:0      收藏:0      [点我收藏+]

标签:http   get   使用   文件   数据      

1. phpcms/base.php 中的 pc_base 类 静态类,主要加载各个文件使用。
2. pc_base 中 load_sys_func 等带 sys的函数,基本都是加载 lib下文件。 func加载functions下; class 加载 class下
3. pc_base 中 函数一般第一个参数为文件名,第二个参数为路径,第3个参数有一般为:加载类是否实体化
4. pc_base 中 load_app开头则为加载modules下的 functions和class等
5. 网站开始入口控制器 phpcms/libs/classes/application.class.php . init()方法检测参数的 函数名称。 默认规则 /caches/configs/route.php 定义
6. 默认执行:/phpcms/modules/content/index.php ->init()
7. 默认执行模块数据库调用: /phpcms/model/content_model.class.php 加载 系统 /phpcms/libs/classes/model.class.php
8. /phpcms/libs/classes/db_factory.class.php 数据库连接工厂 ; 处理连接那个数据库 默认参数配置 /cache/configs/database.php default
9. db_factory.class.php connect() 返回具体的数据库操作类实体 默认为: phpcms/libs/classes/mysql.class.php
10. /phpcms/libs/classes/model.class.php 默认连接数据库 $db_setting 参数设置 在【8】中调用
11.model.cass.php $db 获得数据库连接; 此类中也有数据库的基本操作处理,具体数据库操作使用 【9】 返回的实体类操作
12.系统核心函数文件 /phpcms/libs/functions/global.func.php 主要操作为: getcache 和 template
13.getcache ,调用cache配置文件 /caches/configs/cache.php 默认为:file类型
14.getcache 调用cache系统控制类:cache_factory.class.php;默认为file类型cache file 参数调用cache具体系统处理类:cache_file.class.php get方法获得具体cachename对应的文件返回数组
15.getcache 具体参数说明: 第一个参数为cache文件名称 ,第二个参数为cache目录参数 且cache默认调用路径为caches_data 如: /caches/caches_第二参数/caches_data/第一参数文件名.cache.php
16.setcache 后台处理或安装时系统生成 主要根据数据库表cache中记录是否存在来判断操作,存在则更新,不存在则添加,文件操作同数据库表
17.template 模板模块名称,调用文件名称,调用模板名称(默认为default)模板系统处理类:/phpcms/libs/classes/template_cache.class.php 主要调用template_compile 解析模板并替换模板
18.template_cache.class.php 调用template_parse 来正则替换模板中的标签
19.模板中,标签主要是pc:类型名 template_cache.class.php 用 pc_tag来解析 pc:类型名 , 标签中 action为函数名称,类型名为调用的标签处理类名称,其余标签属性为参数,一般加载的处理类为模块下classes下的标签类如:/content/classe/content_tag.class.php ; 类型名为(‘json‘, ‘xml‘, ‘block‘, ‘get‘)时,特别解析

 

特别说明:
base.php中参数 或者到后台更改参数 设置-》基本设置中更改
//定义网站根路径
define(‘WEB_PATH‘,pc_base::load_config(‘system‘,‘web_path‘));
//js 路径
define(‘JS_PATH‘,pc_base::load_config(‘system‘,‘js_path‘));
//css 路径
define(‘CSS_PATH‘,pc_base::load_config(‘system‘,‘css_path‘));
//img 路径
define(‘IMG_PATH‘,pc_base::load_config(‘system‘,‘img_path‘));
//动态程序路径
define(‘APP_PATH‘,pc_base::load_config(‘system‘,‘app_path‘));
定义的都是带域名的参数,故更改域名后需要更改这些参数 /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/‘,//动态域名配置地址

phpcms程序二次开发记录,布布扣,bubuko.com

phpcms程序二次开发记录

标签:http   get   使用   文件   数据      

原文地址:http://www.cnblogs.com/g2star/p/3793945.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!