很多朋友在使用織夢(mèng)建站或者仿站時(shí)都會(huì)發(fā)現(xiàn),在訪問首頁時(shí)后面都會(huì)添加上index.html 現(xiàn)在我就把這解決辦法分享出來,大家可以試一試,看有沒有用 在www/ 跟目錄下有個(gè)自帶的index.php文
很多朋友在使用織夢(mèng)建站或者仿站時(shí)都會(huì)發(fā)現(xiàn),在訪問首頁時(shí)后面都會(huì)添加上index.html 現(xiàn)在我就把這解決辦法分享出來,大家可以試一試,看有沒有用 在www/ 跟目錄下有個(gè)自帶的index.php文件 原代碼 //自動(dòng)生成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'); } ?> 把上面的代碼替換為 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(); ?> 然后就可以了