How to remove html from 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.
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics









