当前位置: 首页 > 图文教程 > 网络编程 > PHP > smarty静态实验表明,网络上是错的~呵呵

PHP
vBulletin HACK----显示话题大小和打开新窗口于论坛索引页
动态生成gif格式的图像要注意?
PHP编程之高级技巧——利用Mysql函数
下载文件的点击数回填
Banner程序
COM in PHP (winows only)
使用数据库保存session的方法
一个简易需要注册的留言版程序
一个分页的论坛
PHP+javascript液晶时钟
图片存储与浏览一例(Linux+Apache+PHP+MySQL)
smtp邮件发送一例
PHP中的正规表达式(二)
PHP中的正规表达式(一)
网络资源
PHP新手上路(八)
与数据库连接
使用php4加速网络传输
PHP入门
PHP简介

PHP 中的 smarty静态实验表明,网络上是错的~呵呵


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 125 ::
收藏到网摘: n/a

复制代码 代码如下:
<?
require_once("Smarty/libs/Smarty.class.php");
$smarty = new smarty();
$smarty->templates_dir="templates";
$smarty->templates_c_dir="templates_c";
$smarty->left_delimiter="<{";
$smarty->right_delimiter="}>";
$smarty->assign("title","你成功了");
$smarty->display("test.html");
$content=$smarty->fetch("test.html");
$fp=fopen("ok.html","w");
fwrite($fp,$content);
fclose($fp);
?>