发新话题
打印

关于生成静态页面的问题

关于生成静态页面的问题

我是用smarty模板
比如这样
require_once('smarty.class.php');
$smarty = new smarty;
$smarty->assign("name","bob");
$smarty->assign("tel","123456");
$smarty->display('test.tpl');

test.tpl

{$name}
{$tel}
我想用
fopen("test.html","w");
fwrite($fp,$content);
生成静态页,怎么把解析后的代码写道test.html里

TOP

这样玩,那smarty的fetch函数做什么用的?
色色小猪

TOP

嗨嗨,路过
爱上PHP,便拥有了更多的动力!

TOP

发新话题