dede首頁不跳index.html方法
時間:2020-01-05 15:19來源:好學(xué)網(wǎng) 作者:haoxuee 點擊:
次
dede首頁不跳index.html,怎么辦? 如果首頁不需要生成HTML的, 把index.php換成下面代碼 原代碼 ?php if(!file_exists(dirname(__FILE__).'/data/common.inc.php')) { header('Location:install/index.php'); exit(); } //自動生成HTML版 if(isset($_GET['up
dede首頁不跳index.html,怎么辦?
如果首頁不需要生成HTML的, 把index.php換成下面代碼
原代碼
<?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');
}
?>
替換為
<?php
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();
?> (責(zé)任編輯:haoxuee)
學(xué)友請微信搜索好學(xué)網(wǎng),或加公眾號 haoxueecom 獲取更多學(xué)習(xí)資訊!
|
------分隔線----------------------------