dede怎么去掉html

dede去掉html的方法:1、直接刪除cms根目下的index.php文件;2、在根目錄的.htaccess里加入代碼“DirectoryIndex index.html index.php index.htm”;3、在主機里面設置默認首頁順序;4、替換index.php的內容生成動態即可。

dede怎么去掉html

本文操作環境:Windows7系統、DEDECMS5.6版,DELL G3電腦

dede怎么去掉html?

dedecms默認是通過后臺生成index.html,去掉的方法有4種

1.直接刪除CMS根目下的index.php文件 [這個辦法看似最簡單,但是我自己試過后卻不成功,而且刪除后也沒辦法使用動態瀏覽了]?

立即學習前端免費學習筆記(深入)”;

2.使用.htaccess文件 ,目前使用的是這個辦法,試驗成功。

方法如下:在根目錄的.htaccess里加入以下代碼: DirectoryIndex index.html index.php index.htm【建議】

3.在主機里面設置默認首頁順序:把index.html提到最前面。 根據不同主機有不同配置方法。

4.按官方給的更新說明 替換index.php的內容生成動態,如果首頁不需要生成HTML的, 把index.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();? ?>?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();? ?>

相關推薦:《dedecms教程

? 版權聲明
THE END
喜歡就支持一下吧
點贊6 分享