How to save the compiled files generated by smarty to the database-php Tutorial

Source: Internet
Author: User
How to save the compiled files generated by smarty to the database and create a small website in Sina SAEs, which uses the smarty template, but does not have the write permission, which cannot be written in templates_c, is there any way to save it to the database? I don't want to use the cache service and KVDB provided by SAE, because there is no bean


Reply to discussion (solution)

You cannot run it either when it is stored in the database.
A little trouble. Upload the template once every time you modify it.

? Test http://www.smarty.net/docs/zh_CN/caching.custom.tpl

? Test http://www.smarty.net/docs/zh_CN/caching.custom.tpl


I tried this and it can be used, but only the cached ones will enter the database, and the templates_c won't work yet!

As long as you do not modify the template, the content in templates_c will not change.

You cannot run it either when it is stored in the database.
A little trouble. Upload the template once every time you modify it.


In this case, it is not necessary to run every page once first? How tired, the page is enough, more ......

? But yes? Save ???? Ah
Templates_c? Above? ?? What can we do ?,? Some files require php? .

Why should I run every page once? You only need to run the page related to the modified template.
Don't you test the following for modifying the template?

Maybe you haven't figured out what templates_c is doing?
It translates templates in templates into php code and saves them
The code in templates_c is executed when the website is running.

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.