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

难道织梦都是高手吗???不明白,一堆代码连几个好点注释都没有,真汗,还得自己来;

哎,,,现在发觉还是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

原文地址:https://www.cnblogs.com/jincon/p/1719093.html