我创建了config.conf作为配置文件,想运用smarty模板导入并在页面输出
PHP,html和config.conf为编码方式都为utf8,firefox浏览器unicode
页面却出乱码

我将config.conf改成ANSI编码方式

我推断可能与smarty本身的编码方式有关
我从其他人那里拷贝了一个smarty包(我自己的是从官网上下载最新版本的),页面显示正常没有乱码。
config.conf输入信息如下
webTitle=当当网,全球最大的中文网上书店
copyRight=当当网
icpNum = 123456
html代码
<{config_load file="config.conf"}><{#webTitle#}>
---------配置文件demo----------
| copyright | <{#copyRight#}> | <{#icpNum#}> |
PHP代码
require_once("smarty/Smarty.class.php");
$smarty=new Smarty();
$smarty->left_delimiter="<{";
$smarty->right_delimiter="}>";
$smarty->display("index.html");
?>
我想问如果还是用原来的smarty包,如何解决以上问题,谢谢各位
------解决方案--------------------
把 config.conf 改成无bom的utf-8编码试试。