search
HomeCMS TutorialDEDECMSHow 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(); 
?>

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
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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.