最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
smarty教程-smarty入门基础应用实例教程
时间:2022-07-02 10:45:52 编辑:袖梨 来源:一聚教程网
采用smarty编写的程序可以获得最大速度的提高,这一点是相对于其它的模板引擎技术而言的。
*/
代码如下 | 复制代码 |
$servername = 'localhost'; $title ='smarty 教程'; $smarty->display('index.html'); //使用 smarty emplates emplatesindex.html 模板 |
?>
index.html模板文件
代码如下 | 复制代码 |
{include file='head.tpl'} |
/*
smarty 模板变量
.{$name}: 模板变量,smarty中的核心组成,采用smarty定义的左边界符{与右边界符}包含着、以PHP变量形式给出,在smarty程序中将使用
$smarty->assign("name", "李晓军");将模板中的$name替换成“李晓军”三个字。
*/
相关文章
- 明日方舟界园肉鸽待机缘有什么用 历钱通宝待机缘效果 08-06
- 大侠立志传被围攻的山贼事件流程攻略 08-06
- 燕云十六声缺口袋把戏团无伤怎么过 鬼神愁无伤逃课打法 08-06
- win11网络连接不见了怎么解决 08-06
- 《QQ》小世界删除推过方法 08-06
- W3 Total Cache Pro v2.8.11 汉化版 WordPress 缓存插件 08-06