Smarty是PHP的模板引擎,便于将应用程序逻辑与HTML/CSS进行分离。 这意味着PHP代码是应用程序逻辑,并与表现分离。
Smarty设计主要受到以下目标的推动:
- 将表现与应用程序代码分离
- PHP后端,Smarty模板前端
- 补充PHP,而不是取代它
- 为程序员和设计人员实现快速开发/部署
- 快速,易于维护
- 语法容易理解,不需要PHP知识
- 灵活定制开发
- 安全性:与PHP隔离
- 免费,开源
Smarty是PHP模板引擎。快和精益,小内存占用。(Smarty is a template engine for PHP. Smarty is fast and lean with a small memory footprint. )
Smarty是PHP的模板引擎,便于将应用程序逻辑与HTML/CSS进行分离。 这意味着PHP代码是应用程序逻辑,并与表现分离。
名稱與所有者 | smarty-php/smarty |
---|---|
主編程語言 | PHP |
編程語言 | PHP (語言數: 6) |
平台 | |
許可證 | Other |
發布數 | 77 |
最新版本名稱 | v5.1.0 (發布於 2024-04-23 00:22:17) |
第一版名稱 | v2.6.24 (發布於 2014-10-31 00:49:36) |
創建於 | 2014-10-30 20:15:10 |
推送於 | 2024-04-29 08:01:40 |
最后一次提交 | 2024-04-29 10:01:40 |
星數 | 2.2k |
關注者數 | 184 |
派生數 | 696 |
提交數 | 5k |
已啟用問題? | |
問題數 | 692 |
打開的問題數 | 51 |
拉請求數 | 152 |
打開的拉請求數 | 14 |
關閉的拉請求數 | 112 |
已啟用Wiki? | |
已存檔? | |
是復刻? | |
已鎖定? | |
是鏡像? | |
是私有? |
For documentation see
www.smarty.net/docs/en/
Smarty can be run with PHP 5.2 to PHP 7.4.
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.