Dedecms code decryption 1: Simple Analysis of index. php

Source: Internet
Author: User

 

Are dream weaving masters ??? A bunchCodeI don't even have a few comments. I'm so sweaty that I have to come by myself;

Ah, now I find that ecshop is better, the code comments are detailed, and decryption is simple,

No matter. Now let's look at dedecms:

// If the configuration file does not exist, it indicates that it is not installed. You can directly jump to the installation page.

If (! File_exists (dirname (_ file _). '/data/common. Inc. php') // database connection information
{
Header ('location: Install/index. php'); // redirect to installation
Exit (); // exit
}
// Automatically generate the HTML Version

/*

If it is a new version, it will go into the next execution, and if it is not, it will jump directly to index.html

*/
If (isset ($ _ Get ['pcache'])
{
Require_once (dirname (_ file _). "/include/common. Inc. php"); // load some configuration files
Require_once dedeinc. "/arc. partview. Class. php"; // display class? Savetohtml is also in it
$ Globals ['_ arclistenv'] = 'index ';
$ ROW = $ dsql-> getone ("select * from '#@__ homepageset'"); // query the homepage, #@__ Is the database prefix
$ Row ['templet'] = mftemplet ($ row ['templet']);
$ Pv = new partview (); // instantiate to generate the main interface
$ PV-> settemplet ($ pai_basedir. $ pai_templets_dir. "/". $ row ['templet']);
$ PV-> savetohtml (dirname (_ file _). '/index.html'); // generate an HTML Homepage
Include (dirname (_ file _). '/index.html ');
Exit ();
}
Else
{
Header ('HTTP/1.1 301 moved permanently ');
Header ('location: index.html ');
}

Forget it. I don't think there is anything to write. Do I have time to decrypt it? O (distinct _ distinct) O ~

 

Source: http://yi1.com.cn/blog? Action = show & id = 13

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: info-contact@alibabacloud.com 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.