Simple modification and optimization of time-space white generation on the DEDE Homepage

Source: Internet
Author: User
Tags blank page

The front-end homepage is blank and the user experience is optimized;

Open the makehtml_homepage.php file in the default DEDE/directory! This file is mainly used to process homepage data generation;

Well, our goal is very clear. When the background generates the HTML file of the front-end homepage, it cannot be blank!

The method is very simple. I am not talking nonsense either:

First, find the following code in the file:

$remotepos = empty($remotepos)? '/index.html' : $remotepos;$isremote = empty($isremote)? 0 : $isremote;$serviterm = empty($serviterm)? "" : $serviterm;$homeFile = DEDEADMIN."/".$position;$homeFile = str_replace("\\","/",$homeFile);$homeFile = str_replace("//","/",$homeFile);

Append a piece of code after the above Code:

$homeBakFile = str_replace($position,"../index_bak.html",$homeFile);

Continue down:

$ Fp = fopen ($ homeFile, "r") or die ("the file name you specified is incorrect and cannot be created"); fclose ($ fp );

The following code is also appended:

$ Cfp = fopen ($ homeBakFile, "w") or die ("the file name you specified is incorrect and cannot be created"); fclose ($ cfp );

Continue to find:




And append a piece of code below:


OK. Now, you can generate a static Homepage without any blank page!

The principle is also very simple: generate data in another file, and then copy it to the official file!

This article from the "against the wind" blog, please be sure to keep this source

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.