thinkphp using Smarty

Source: Internet
Author: User

Thinkphp supports a variety of PHP template engines that can be configured to suit individual needs.

The first step:

First go to smarty official online download a smarty.

Step Two:

Unzip the tarball, there will be two folders: Demo and libs. Open the Libs folder and copy all the contents.

Step Three:

Open the Thinkphp folder in the root directory of your Web site. There is a vendor folder, this folder is TP call third-party class library, new Folder Smarty, paste the copied content.

Fourth Step:

Open the configuration file for your project and you should conf.php the file in the Conf directory of your project directory.

Add the following configuration:


 

If you want to configure more, you can also add '

Tmpl_engine_config ' =>array (' Caching ' =>true, ' template_dir ' =>tmpl_path, ' Compile_dir ' =>cache_path, ' Cache_dir ' =>temp_path)

This way you can use the Smarty template. The file location of the template has not changed and the cache location has not changed.

Transferred from: http://www.shangxueba.com/jingyan/1917208.html

thinkphp using Smarty

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.