Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report