<?phpphp
include "./libs/Smarty.class.php";html
$smarty=new Smarty;
//自定義保存的目錄
//smarty2時期的用法
// $smarty->template_dir="./view/";
// $smarty->compile_dir="./comps/";
this
//smarty3時期的用法
$smarty->setTemplateDir("./view/");
$smarty->setCompileDir("./comps/");3d
$smarty->assign("title","this is a demo");
$smarty->assign("content","this is a content");htm
$smarty->display("test.html")blog
?>it