最新下载
热门教程
- 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替换成“李晓军”三个字。
*/
相关文章
- 《弓箭传说2》新手玩法介绍 01-16
- 《地下城与勇士:起源》断桥烟雨多买多送活动内容一览 01-16
- 《差不多高手》醉拳龙技能特点分享 01-16
- 《鬼谷八荒》毕方尾羽解除限制道具推荐 01-16
- 《地下城与勇士:起源》阿拉德首次迎新春活动内容一览 01-16
- 《差不多高手》情圣技能特点分享 01-16