<?php
include "./libs/Smarty.class.php";
$smarty=new Smarty;
//自定义保存的目录
//smarty2时期的用法
// $smarty->template_dir="./view/";
// $smarty->compile_dir="./comps/";
//smarty3时期的用法
$smarty->setTemplateDir("./view/");
$smarty->setCompileDir("./comps/");
$smarty->assign("title","this is a demo");
$smarty->assign("content","this is a content");
$smarty->display("test.html")
?>