<?php
require_once('../smarty/Smarty.class.php');
$smarty = new Smarty();
$smarty->left_delimiter = "{";//左界定符
$smarty->right_delimiter = "}";//右界定符
$smarty->setTemplateDir('tpl');//html模板的地址
$smarty->setCompileDir('template_c');//模板编译生成的文件
$smarty->setCacheDir('cache');//缓存
$smarty->caching = true;//开启缓存
$smarty->cache_lifetime = 120;//缓存时间
//
// $smarty->assign('articletitle', 'i am a star');//给articletitle赋值
// $arr = array('title'=>'smart学习','author'=>'小明');//?
//
// $smarty->assign($arr);
$smarty->assign('time',time());
$smarty->display('tpl/test.tpl');//展示编写好的模板
?>
我也是,楼主解决了吗
注释去掉