最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php smarty 目录引擎实例入门教程
时间:2022-07-02 10:46:39 编辑:袖梨 来源:一聚教程网
php smarty 目录引擎实例入门教程
require(你的目录 . 'smarty/libs/Smarty.class.php');
/*
* 模版引擎
*/
$tpl = new Smarty();
$tpl->template_dir = 模板目录;
$tpl->compile_dir =解析目录 . 'tmp/template_c/';
$tpl->debugging = false;
$tpl->caching = 0;
$tpl->cache_lifetime = 6000;
$tpl->left_delimiter = '';
首页smarty的配置完成下面来看个实例
$tpl->assign('cityid', "长沙");
我们的index.tpl模板文件
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
显示结果为
长沙
好了简单吧,关于foreach item setion下次再次。
本站原创转载注明www.111com.net
相关文章
- 火影忍者怎么获得大招 05-03
- 星际战甲新手什么刀好 05-03
- 文明6秦始皇金字塔怎么加速 05-03
- 全民奇迹2龙骸巨剑怎么获得 05-03
- 星露谷物语鲟鱼怎么获得 05-03
- 长安幻想怎么转职 05-03