使用dede怎么去掉html
建站服務器
這篇文章給大家介紹使用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_onceDEDEINC."/arc.partview.class.php";$GLOBALS['_arclistEnv']='index';$row=$dsql->GetOne("Select*From`dede_homepageset`");$row['templet']=MfTemplet($row['templet']);$pv=newPartView();$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_onceDEDEINC."/arc.partview.class.php";$GLOBALS['_arclistEnv']='index';$row=$dsql->GetOne("Select*From`dede_homepageset`");$row['templet']=MfTemplet($row['templet']);$pv=newPartView();$pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$row['templet']);$pv->Display();?>
關于使用dede怎么去掉html就分享到這里了,希望以上內容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。
總結
以上是生活随笔為你收集整理的使用dede怎么去掉html的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 怎么在linux系统中实现openmp多
- 下一篇: rtx4050显卡多少钱 rtx4050