惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
S
SegmentFault 最新的问题
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
C
Cisco Blogs
博客园 - 叶小钗
P
Privacy International News Feed
Jina AI
Jina AI
Apple Machine Learning Research
Apple Machine Learning Research
T
Threatpost
IT之家
IT之家
博客园 - 聂微东
Know Your Adversary
Know Your Adversary
Help Net Security
Help Net Security
罗磊的独立博客
I
Intezer
S
Schneier on Security
博客园_首页
C
CERT Recently Published Vulnerability Notes
雷峰网
雷峰网
Cisco Talos Blog
Cisco Talos Blog
宝玉的分享
宝玉的分享
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Webroot Blog
Webroot Blog
TaoSecurity Blog
TaoSecurity Blog
MyScale Blog
MyScale Blog
P
Privacy & Cybersecurity Law Blog
T
The Exploit Database - CXSecurity.com
PCI Perspectives
PCI Perspectives
Security Latest
Security Latest
H
Heimdal Security Blog
S
Secure Thoughts
Hacker News: Ask HN
Hacker News: Ask HN
Y
Y Combinator Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Microsoft Security Blog
Microsoft Security Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
SecWiki News
SecWiki News
The GitHub Blog
The GitHub Blog
A
Arctic Wolf
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
T
Threat Research - Cisco Blogs
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

博客园 - 锐

Windows7 Server 2008 下安装Oracle 10g提示“程序异常终止,发生未知错误”的解决方法 Android应用自动更新功能的代码实现 Undefined exploded archive location 项目不能部署 linux下mysql5.5.19编译安装笔记【已验证】 CSS+DIV排版时容器内对象全部设置了float属性后容器不能自动适应高度的解决方案 如何解决Firefox检测不到div高度问题 DD_belatedPNG,解决IE6不支持PNG绝佳方案 .net程序运行在无.net framework环境中 struts2 freemarker当中引进java 常量java静态方法 - 锐 简体-繁体互转换的一个JS - 锐 - 博客园 C#实现通过URL触发自己的程序 Tencent://Message/协议的实现原理 - 锐 - 博客园 国内三大免费流媒体WAP门户网站(视频类WAP网站) C#中RSA加密解密和签名与验证的实现 (转) C#读取CPUid,硬盘id,网卡Mac地址 Struts2.1.6使用小技巧 java -D参数简化加入多个jar MySQL Proxy 学习笔记(转) 用apache ab做web压力测试
php Smarty模板生成html文档的方法 - 锐 - 博客园
· 2011-02-18 · via 博客园 - 锐

代码

<?php 
/* 
file:config_smarty.php 
done:配置Smarty 
author:www.5dkx.com 
date:2009-12-21 
*/ 
include_once("../libs/smarty.class.php"); 
class MySmarty extends Smarty{ 
function __construct() 

$this->Smarty(); 
$this->config_dir = "../config"
$this->cache_dir = "../cache"
$this->template_dir = "../template"
$this->compile_dir = "../template_c"
$this->cache = false


$smart = new MySmarty(); 
$smart->assign("title","标题"); 
$smart->assign("content","内容"); 
$smart->display('article.tpl'); 
$output = $smart->fetch('article.tpl'); 
$Path = "../html/1.html"
$fp = fopen($Path,"w"); 
fwrite($fp,$output); 
fclose($fp); 
?>