dedem index.php.htm_如何将DEDE织梦网站首页的index.html去掉-百度经验

按官方给的更新说明 替换index.php的内容 生成动态,如果首页不需要生成HTML的, 把index.php换成下面代码

原代码

if(!file_exists(dirname(__FILE__).'/data/common.inc.php'))

{

header('Location:install/index.php');

exit();

}

//自动生成HTML版

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

{

require_once (dirname(__FILE__) . "/include/common.inc.php");

require_once DEDEINC."/arc.partview.class.php";

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

$row = $dsql->GetOne("Select * From `dede_homepageset`");

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

$pv = new PartView();

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

$pv->SaveToHtml(dirname(__FILE__).'/index.html');

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

exit();

}

else

{

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

header('Location:index.html');

}

?>

替换为

if(!file_exists(dirname(__FILE__).'/data/common.inc.php'))

{

header('Location:install/index.php');

exit();

}

require_once (dirname(__FILE__) . "/include/common.inc.php");

require_once DEDEINC."/arc.partview.class.php";

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

$row = $dsql->GetOne("Select * From `dede_homepageset`");

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

$pv = new PartView();

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

$pv->Display();

?>

到FTP中下载index.php,用Dreamweaver打开,将上述代码进行替换即可。

你可能感兴趣的:(dedem,index.php.htm)