How to change the Smarty generated compilation file into a database

Source: Internet
Author: User
In Sina SAE built a small website, with the Smarty template, but no write permission, Templates_c write, what method to change into a database? Do not want to use the SAE to provide caching services and KVDB, because no peas


Reply to discussion (solution)

Save it in the database, you can't run it.
A little trouble, just upload it once every time you modify the template.

Test HTTP://WWW.SMARTY.NET/DOCS/ZH_CN/CACHING.CUSTOM.TPL.

Test HTTP://WWW.SMARTY.NET/DOCS/ZH_CN/CACHING.CUSTOM.TPL.


This I tried, can be used, but only the cache will go into the database, Templates_c not yet!

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

Save it in the database, you can't run it.
A little trouble, just upload it once every time you modify the template.


In that case, wouldn't it be necessary to run each page once before it was done? More tired, less pages can also, more ...

What is the deposit????? Ah
Templates_c??? What can I do? Some files are required by PHP.

Why do I have to run each page once? Just run the page that is related to the template you've modified.
Can't you modify the template to not test the following?

Maybe you didn't figure out what Templates_c was doing, did you?
It is to translate the template in templates into PHP code and save it.
The site is running with code in Templates_c

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