Home>Article>CMS Tutorial> How to remove index.html from DreamWeaver homepage
How to remove index.html from the DreamWeaver homepage?
Many friends will find that when they use Dreamweaver to build a website or imitate a website, index.html will be added at the end when visiting the homepage
Now I will share this solution. You can give it a try and see if it works.
Recommended learning:梦Weavercms
There is a built-in index.php file in the www/ and directory
Original code
The code is as follows:
//自动生成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'); } ?>
Replace the above code with
The code is as follows:
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(); ?>
Then that’s it.
The above is the detailed content of How to remove index.html from DreamWeaver homepage. For more information, please follow other related articles on the PHP Chinese website!