$smarty->fetch 的使用
[08-23 22:09:51] 来源:http://www.duoxue8.com PHP教程 阅读:640次
$smarty->fetch 的使用,标签:PHP技巧,php培训,php学习,php安装,http://www.duoxue8.com
$smarty->fetch 的使用 结束。
include("Smarty.class.php");$smarty = new Smarty;
$smarty->caching = true;
// only do db calls if cache doesn't exist// 只有在缓存不存在时才调用数据库if(!$smarty->is_cached("index.tpl")){
// dummy up some data $address = "245 N 50th"; $db_data = array( "City" => "Lincoln", "State" => "Nebraska", "Zip" = > "68502" );
$smarty->assign("Name","Fred"); $smarty->assign("Address",$address); $smarty->assign($db_data);
}
// capture the output// 捕获输出$output = $smarty->fetch("index.tpl");
// do something with $output here// 对将要输出的内容进行处理
echo $output;
$smarty->fetch 的使用 结束。
Tag:PHP教程,PHP技巧,php培训,php学习,php安装,电脑学习 - 编程入门 - PHP教程
$smarty->fetch 的使用相关文章
- ·上一个:php怎么上传大文件
- $smarty->fetch 的使用
- › $smarty->fetch 的使用
- › smarty中的assign()函数和display()函数section()实现
- › 利用smarty生成静态页的关键代码
- › Smarty中批量生成静态html页面的方法
- › 使用smarty模板或缓存实现页面静态化
- › php+smarty生成静态页
- › Smarty中批量生成html的方法
- › Smarty逼我要这样去显示日期
- › 华为SmartAX MT800的路由配置方法
- › ESET Smart Security 关闭提醒操作系统存在漏洞
- 在百度中搜索相关文章:$smarty->fetch 的使用
- 在谷歌中搜索相关文章:$smarty->fetch 的使用
- 在soso中搜索相关文章:$smarty->fetch 的使用
- 在搜狗中搜索相关文章:$smarty->fetch 的使用