Home > CMS Tutorial > DEDECMS > body text

How to remove index.html from DreamWeaver homepage

藏色散人
Release: 2019-12-02 11:25:11
Original
2602 people have browsed it

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');
}
?>
Copy after login

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();
?>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!