建站服務(wù)器
這篇文章給大家介紹使用dede怎么去掉html,內(nèi)容非常詳細(xì),感興趣的小伙伴們可以參考借鑒,希望對(duì)大家能有所幫助。
dedecms默認(rèn)是通過(guò)后臺(tái)生成index.html,去掉的方法有4種
1.直接刪除CMS根目下的index.php文件 [這個(gè)辦法看似最簡(jiǎn)單,但是我自己試過(guò)后卻不成功,而且刪除后也沒(méi)辦法使用動(dòng)態(tài)瀏覽了]
2.使用.htaccess文件 ,目前使用的是這個(gè)辦法,試驗(yàn)成功。
方法如下:在根目錄的.htaccess里加入以下代碼: DirectoryIndex index.html index.php index.htm【建議】
3.在主機(jī)里面設(shè)置默認(rèn)首頁(yè)順序:把index.html提到最前面。 根據(jù)不同主機(jī)有不同配置方法。
4.按官方給的更新說(shuō)明 替換index.php的內(nèi)容生成動(dòng)態(tài),如果首頁(yè)不需要生成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();?>關(guān)于使用dede怎么去掉html就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到。
文章標(biāo)題:使用dede怎么去掉html
當(dāng)前鏈接:http://chinadenli.net/article42/chcgec.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供電子商務(wù)、云服務(wù)器、網(wǎng)站維護(hù)、靜態(tài)網(wǎng)站、外貿(mào)網(wǎng)站建設(shè)、App設(shè)計(jì)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)