What is Smarty?

Source: Internet
Author: User
Tags php template
What is Smarty?Smarty is a php template engine written using PHP, PHP.Net official provides, it provides the separation of logic and external content, simply speaking, the purpose is to use the PHP programmer to separate with the artist,using the programmer to change the logic of the program does not affect the design of the Art page, the art of re-modifying the page does not affect the program logic, which is particularly important in the multi-person collaborative project. Smarty Advantages1.Speed: The program written in Smarty can get the maximum speed improvement, which is relative to other template engine technology. 2.compiled: A program written in Smarty is compiled into a non-template PHP file at runtime, which uses a mix of PHP and HTML to convert the Web request directly into the file the next time the template is accessed. Instead of recompiling the template (in case the source program has not changed)3.caching technology: Smarty chooses a caching technology that caches the HTML files the user eventually sees as a static HTML page, and when the cache property of the Smarty is set to True, The user's Web request is converted directly to this static HTML file during the Cachetime period set by Smarty, which is equivalent to calling a static HTML file. 4.plug-in technology: Smarty can customize plugins. Plugins are actually some of the custom functions. 5. if/can be used in the templateElseIf/Else/endif. The template file can be easily reformatted by using a judgment statement. Not suitable for use in smarty places1.content that needs to be updated in real time. For example, like a stock display, it needs to update the data frequently, and this type of program uses Smarty to slow down the processing of the template. 2.Small Project. Small project because the project is simple and the artist and programmer are in one person's project, using Smarty will lose the advantage of rapid development of PHP. 


Reprinted from: Http://baike.baidu.com/link?url=-raeeRXLUi4lHWTlkCEc_3Sqtf4W8QNwUV19lOH1_VZrWTPbk16pvBdnKGHEl6VfmblgcLWK7fsc0hSoMCueY_

What is Smarty?

Large-Scale Price Reduction
  • 59% Max. and 23% Avg.
  • Price Reduction for Core Products
  • Price Reduction in Multiple Regions
undefined. /
Connect with us on Discord
  • Secure, anonymous group chat without disturbance
  • Stay updated on campaigns, new products, and more
  • Support for all your questions
undefined. /
Free Tier
  • Start free from ECS to Big Data
  • Get Started in 3 Simple Steps
  • Try ECS t5 1C1G
undefined. /

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.