smarty開啟快取後第一次刷頁面亂碼,再刷一次就正常了,工程和頁面都是utf8編碼,不知道***問題。
PHP程式碼如下(smarty3.1.16)
<?php
include_once './libs/Smarty.class.php';
#$ smarty = new Smarty();
$smarty->caching =1;
$smarty->cache_lifetime =3 ;
$smarty->assign( "name","萬事如意");
$smarty->display("name.html");
模版
##<!DOCTYPE html><html><head><meta charset="UTF-8">#<title>Insert title here</title></head><body># {$name}#<body># {$name}
</body>