Home CMS Tutorial DEDECMS How to remove html from dede

How to remove html from dede

May 24, 2021 am 10:53 AM
dede

dede method to remove html: 1. Directly delete the index.php file under the CMS root directory; 2. Add the code "DirectoryIndex index.html index.php index.htm" to the .htaccess in the root directory; 3. , set the default homepage order in the host; 4. Replace the content of index.php to generate dynamics.

How to remove html from dede

The operating environment of this article: Windows 7 system, DedeCMS version 5.6, DELL G3 computer

How to remove html from dede?

dedecms generates index.html through the background by default. There are 4 ways to remove it

1. Directly delete the index.php file under the CMS root directory [This method seems to be the simplest , but I tried it myself but failed, and after deleting it, I couldn’t use dynamic browsing]

2. Use the .htaccess file. This method is currently used and the test was successful.

The method is as follows: Add the following code to .htaccess in the root directory: DirectoryIndex index.html index.php index.htm [Suggestion]

3. Set the default homepage order in the host: index.html is mentioned at the front. There are different configuration methods according to different hosts.

4. Follow the official update instructions to replace the content of index.php to generate dynamics. If the homepage does not need to generate HTML, replace index.php with the following code

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

Related recommendations: " dedecms tutorial

The above is the detailed content of How to remove html from dede. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1662
14
PHP Tutorial
1261
29
C# Tutorial
1234
24