Smarty

Smarty是PHP模板引擎。快和精益,小内存占用。(Smarty is a template engine for PHP. Smarty is fast and lean with a small memory footprint. )

  • Owner: smarty-php/smarty
  • Platform:
  • License:: Other
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

Smarty是PHP的模板引擎,便于将应用程序逻辑与HTML/CSS进行分离。 这意味着PHP代码是应用程序逻辑,并与表现分离。

Smarty设计主要受到以下目标的推动:
  • 将表现与应用程序代码分离
  • PHP后端,Smarty模板前端
  • 补充PHP,而不是取代它
  • 为程序员和设计人员实现快速开发/部署
  • 快速,易于维护
  • 语法容易理解,不需要PHP知识
  • 灵活定制开发
  • 安全性:与PHP隔离
  • 免费,开源

Main metrics

Overview
Name With Ownersmarty-php/smarty
Primary LanguagePHP
Program languagePHP (Language Count: 6)
Platform
License:Other
所有者活动
Created At2014-10-30 20:15:10
Pushed At2025-05-03 21:36:54
Last Commit At2025-05-03 23:36:46
Release Count90
Last Release Namev5.5.0 (Posted on 2025-05-03 23:36:48)
First Release Namev2.6.24 (Posted on 2014-10-31 00:49:36)
用户参与
Stargazers Count2.3k
Watchers Count184
Fork Count716
Commits Count5.1k
Has Issues Enabled
Issues Count759
Issue Open Count75
Pull Requests Count171
Pull Requests Open Count22
Pull Requests Close Count119
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

Smarty 3 template engine

smarty.net

Build Status

Documentation

For documentation see
www.smarty.net/docs/en/

Requirements

Smarty can be run with PHP 5.2 to PHP 7.4.

Distribution repository

Smarty 3.1.28 introduces run time template inheritance

Read the NEW_FEATURES and INHERITANCE_RELEASE_NOTES file for recent extensions to Smarty 3.1 functionality

Smarty versions 3.1.11 or later are now on github and can be installed with Composer.

The "smarty/smarty" package will start at libs/.... subfolder.

To get the latest stable version of Smarty 3.1 use:

"require": {
    "smarty/smarty": "~3.1"
}

in your composer.json file.

To get the trunk version use:

"require": {
    "smarty/smarty": "~3.1@dev"
}

For a specific version use something like:

"require": {
    "smarty/smarty": "3.1.19"
}

PHPUnit test can be installed by corresponding composer entries like:

"require": {
    "smarty/smarty-phpunit": "3.1.19"
}

Similar applies for the lexer/parser generator.

"require": {
    "smarty/smarty-lexer": "3.1.19"
}

Or you could use:

"require": {
    "smarty/smarty-dev": "3.1.19"
}

Which is a wrapper to install all 3 packages.

Composer can also be used for Smarty2 versions 2.6.24 to 2.6.30.