<?php
include_once("smarty/Smarty.class.php"); //包含smarty類文件
$smarty = new Smarty(); //建立smarty實例對象$smarty
$smarty->config_dir="Smarty/Config_File.class.php"; // 目錄變量
$smarty->caching=false; //是否使用緩存,項目在調試期間,不建議啓用緩存
$smarty->template_dir = "./templates"; //設置模板目錄
$smarty->compile_dir = "./templates_c"; //設置編譯目錄
$smarty->cache_dir = "./smarty_cache"; //緩存文件夾
$smarty->caching=true; //開啓緩存,爲flase的時候緩存無效
$smarty->cache_lifetime= 60;
//----------------------------------------------------
//左右邊界符,默認爲{},但實際應用當中容易與JavaScript相沖突
//----------------------------------------------------
$smarty->left_delimiter = "{";
$smarty->right_delimiter = "}";
?>