您的位置:首页 > 编程语言 > PHP开发

dedecms代码解密1:index.php简单分析

2010-04-24 09:07 495 查看
难道织梦都是高手吗???不明白,一堆代码连几个好点注释都没有,真汗,还得自己来;

哎,,,现在发觉还是ecshop的比较好,代码注释详细,解密简单,

不管了,现在看看dedecms的吧:

//如果不存在配置文件,说明没有安装,直接跳到安装页面

if(!file_exists(dirname(__FILE__).'/data/common.inc.php')) // 数据库连接信息

{

header('Location:install/index.php'); //重定向到安装

exit(); //退出

}

//自动生成HTML版

/*

如果是更新缓存,则进入下面的执行,否则,直接跳到index.html

*/

if(isset($_GET['upcache']))

{

require_once (dirname(__FILE__) . "/include/common.inc.php"); //加载一些配置文件

require_once DEDEINC."/arc.partview.class.php"; //显示类?SaveToHtml也在里面

$GLOBALS['_arclistEnv'] = 'index';

$row = $dsql->GetOne("Select * From `#@__homepageset`"); //查询首页,#@__是数据库前缀

$row['templet'] = MfTemplet($row['templet']);

$pv = new PartView(); //实例化,生成主界面

$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']);

$pv->SaveToHtml(dirname(__FILE__).'/index.html'); //生成html首页

include(dirname(__FILE__).'/index.html');

exit();

}

else

{

header('HTTP/1.1 301 Moved Permanently');

header('Location:index.html');

}

算了,感觉没什么可写的,有时间接着往下解密把?O(∩_∩)O~

来源:http://yi1.com.cn/blog/?action=show&id=13
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: