Create a separate PHP file, how to reference the Dedecms template file

Source: Internet
Author: User
Title, I created a php file alone, and now I want to import the dedecms template file head.htm How to associate it?
The directly imported file shows the code inside the head.htm. Did not explain the Dedecms in the label, how to deal with it?

Reply content:

Title, I created a php file alone, and now I want to import the dedecms template file head.htm How to associate it?
The directly imported file shows the code inside the head.htm. Did not explain the Dedecms in the label, how to deal with it?

You need to use the Dedecms template to interpret the engine, and then follow the instructions to load the template file.
It is recommended that you copy an existing file and then modify it at 1.1 points. This allows you to see the effect at any time.

Before this question is my blog I wrote a separate article related to the "tutorial", in fact, it is very simple, only need to load the template parsing class can be woven dream. Create the example.php in the root directory with the following code:


  
   SetTemplet($tempfile);//设定模板文件路径$pv->Display();//显示该页面?>

Then put your current template directory, create a example.htm template file, in this template file can use the dream system of the global tag . A more detailed introduction you can go to the blog View Original: http://www.xuewl.com/framework/dede_class_system_partview.html

Based on the root directory of the index.html modified out to see that

  • 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.