Destoon Two-time Development walkthrough Tutorial

Source: Internet
Author: User

Destoon Two-time Development walkthrough Tutorial

Destoon is the preferred solution for the open source business-to-business (e-commerce) portal based on Php+mysql.

In this paper, the two development of Destoon is summarized as follows: first, the initialization system contains the system root directory common.inc.php can initialize the system. For example, create a hello.php under the site root, with the following code:

    1. Require ' common.inc.php ';
    2. Echo ' Hello world ';
    3. ?>
Copy Code

Second, after writing the logic system initialization, you can write logic code in the PHP file, but also can call the system built-in variables, functions and classes. Example:

    1. Require ' common.inc.php ';
    2. echo dt_root;//physical path to output site
    3. Echo '
      ';
    4. Echo dt_path;//Home address of the output site
    5. Echo '
      ';
    6. $r = $db->get_one ("select * FROM {$DT _pre}category");//Query a data from the table
    7. Print_r ($r);//print read data
    8. $A = Cache_read (' area.php ');//Read the system's region cache
    9. Print_r ($A);//print read data
    10. Print_r ($MODULE);//print System Module data
    11. Message (' Hello world ');//output a hint of information
    12. ?>
Copy Code

Third, the application template all the HTML output to the browser is displayed through the rules in the template. How to use:

    1. Include template (' A ', ' B ');
Copy Code

The parameter a indicates that the template name parameter B indicates the directory where the templates are stored, and this parameter can not be set if the template directory is default, then: Template (' A ', ' B '); Represents the template/default/b/a.htm template file (' a '); Representative Template/default/a.htm Template File Example

    1. Require ' common.inc.php ';
    2. Template (' Hello ');
    3. ?>
Copy Code

In addition, template/default/hello.htm template files need to be created in advance.

Recommended reading:Destoon Introductory Tutorials and tips examples
  • Related Article

    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.