Get the App
SLTechnology News&Howtos  ›  Servers  › 

An example analysis of index.html after removing the access address of the home page when weaving dream to build a station or imitating a station

Shulou Source: shulou.com Published: 2022-06-01 06:40:50 09月22日 Update

In this issue, the editor will bring you an example analysis of the index.html after removing the visit address of the home page when building a dream or imitating a station. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

Many friends will find that index.html will be added when they visit the home page when they use dream weaving to build or imitate the site.

Now I'm going to share this solution, and you can try it and see if it works.

The code is as follows:

There is a self-contained index.php file in the www/ and directory.

Original code

/ / automatically generate HTML version

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

}

? >

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

? >

And then it's okay.

The above is the example analysis of the index.html shared by the editor after removing the home page access address when weaving dreams or imitating the site. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Tags: Analysis code site building home page address example case analysis content under professional small and medium rich in content methods that is files articles more friends directories knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn MariaDB Xiaomi Linux Microsoft