PHPCMS_单入口初始化执行流程

index.php
(01)常量"PHPCMS_PATH" : "weicms/";
(02)加载"base.php"    : "weicms/\phpcms\base.php";
(03)实例"pc_base::creat_app()" -> "base.php"(21);


base.php
(01)常量"IN_PHPCMS"     : "1";
(02)常量"PC_PATH"       : "weicms/phpcms/";
(03)常量"PHPCMS_PATH"   : "weicms/phpcms/../";
(04)常量"CACHE_PATH"    : "weicms/cache/";
(05)常量"SITE_PROTOCOL" : "http://";
(06)常量"SITE_URL"      : "127.0.0.1";
(06)常量"HTTP_REFERER"  : " ";
(07)常量"SYS_START_TIME": "0.12845400 1389421914";
(08)加载"global.func.php"          : "weicms\phpcms\libs\functions\global.func.php";
(09)加载"extention.func.php"       : "weicms\phpcms\libs\functions\extention.func.php";
(10)加载"autoload\*.func.php"      : "weicms\phpcms\libs\functions\autoload\*.func.php";
(11)配置"'errorlog' => 1,报错方式" : "weicms\cache\config\system.php";
(12)配置"'timezone' => 'Etc/GMT-8',本地时区" : "weicms\cache\config\system.php"
(13)配置"SYS_TIME" : "1389421914";
(14)常量"WEB_PATH" : "/weicms/";
(15)常量"JS_PATH"  : "
http://127.0.0.1/weicms/statics/js/ ";
(16)常量"CSS_PATH" : "
http://127.0.0.1/weicms/statics/css/ ";
(17)常量"IMG_PATH" : "
http://127.0.0.1/weicms/statics/img/ ";
(18)常量"APP_PATH" : "
http://127.0.0.1/weicms/ ";
(19)常量"PLUGIN_STATICS_PATH"  : "
http://127.0.0.1/weicms/statics/plugin/ ";
(20)配置"'gzip' => 1,GZIP压缩" : "weicms\cache\config\system.php";
(21)实例"creat_app()" -> "load_sys_class('application')" -> "_load_class('application')";
(21-1)加载并实例"application.class.php" : "phpcms\libs\classes\application.class.php";


application.class.php
(01)加载并实例"param.class.php" : "weicms\phpcms\libs\classes\param.class.php";
(02)配置"array('m'=>'content', 'c'=>'index', 'a'=>'init'),初始路由" : "weicms\caches\configs\route.php";
(03)加载并实例"index.php"       : "weicms\phpcms\modules\content\index.php";
(04)执行"index.php" : "init()";


index.php
(01)常量"CACHE_MODEL_PATH" : "weicms\caches\caches_model\caches_data";
(02)加载"util.func.php"    : "weicms\phpcms\modules\content\functions\util.func.php";
(03)加载并实例"content_model.class.php" : "weicms\phpcms\model\content_model.class.php";
(04)引入COOKIE"_userid,_username,_groupid";
(05)常量"SITEID"     : "1";
(06)加载"sitelist.cache.php,站点"           : "weicms\caches\caches_commons\caches_data\sitelist.cache.php";
(07)加载"category_content_1.cache.php,分类" : "weicms\caches\caches_commons\caches_data\category_content_1.cache.php"
(08)加载"index.html" : "weicms\phpcms\templates\default\content\index.html";


备注:
(1)DIRECTORY_SEPARATOR 路径分隔符,在win里为\ ,在linux 里为/;
(2)$_SERVER['HTTP_REFERER']) 获取上一页URL;
(3)microtime() 返回当前 Unix 时间戳和微秒数;

你可能感兴趣的:(PHPCMS_单入口初始化执行流程)