index.php定义路径常量加载运行时目录runtime.php
检查php版本
if(version_compare(php_version,'5.2.0',' 5.2.0 !');系统信息
define('is_cgi',substr(php_sapi, 0,3)=='cgi' ? 1 : 0 );
define('is_win',strstr(php_os, 'win') ? 1 : 0 );
$_server[‘php_self’] 表示当前 php 文件相对于网站根目录的位置地址,与 document root 相关.
$url = “http://”$_server[‘http_host’].$_server[‘php_self’]可用来表示当前url;
定义路径
defined('core_path') or define('core_path', think_path.'lib/');
运行时文件
load_runtime_file()
加载公共函数库、核心控制类、异常处理类、行为扩展类,此处用数组遍历加载,可以一试。
检查缓存目录、调试模式下删除编译缓存:
if(is_file(runtime_file)) unlink(runtime_file);
check_runtime()build_runtime_cache()创建项目目录结构
build_app_dir()执行入口
think::start();').addclass('pre-numbering').hide(); $(this).addclass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadein(1700); }); }); 以上就介绍了thinkphp源码解析 version 31 -1,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。
