亂碼怎么辦?加header沒(méi)效果?用meta就可以為什么
<!--<meta charset="utf-8"/>-->
<?php
//header("content-type:text/html;charset:utf-8;");
require("../smarty/Smarty.class.php");
$smarty=new Smarty;
$smarty->left_delimiter="{";
$smarty->right_delimiter="}";
$smarty->setCompileDir("template_c");
$smarty->setTemplateDir("tpl");
$smarty->setCacheDir("cache");
$smarty->caching=true;
$smarty->cache_lifetime=120;
$smarty->assign("test","這是測(cè)試");
$smarty->display("test.tpl");
//$smarty->
?>
2015-04-10
php文件也要保存成utf8格式
2015-10-28
在tpl文件上邊加上