现在template.tpl.htm include search.tpl.htm这模板如果language/lang_utf-8.php这页是以UTF-8 encode 便会出现空白行
图: http://img90.imageshack.us/img90/6894/nowy2.png
但当language/lang_utf-8.php这页不是用UTF-8便没有多出空白行试过用firefox看,没有多出空白行,IE看就有空白啊
为何会这样?謝謝
=======================template.php
<?
include('language/lang_utf-8.php');require_once('lib/Smarty.class.php');
$tpl = new Smarty();
$tpl->template_dir= "./templates/";
$tpl->compile_dir= "./templates_c/";
$tpl->left_delimiter="{#";
$tpl->right_delimiter="#}";
$tpl->assign("templatepath",$templatepath);$tpl->assign($lang);
$tpl->assign('search_tpl','../templates/search_1.tpl.htm');
$tpl->display('../templates/template.tpl.htm');
?>=======================search_1.tpl.htm
<head>
</head>
<html>
<body>
<form action="search.php" method="post">
<input type="text" name="inputdata" />
<input type="submit" name="search" value="search" />
</form>
</body>
</html>=======================template.tpl.htm
{#include file=$search_tpl#}=======================
language/lang_utf-8.php
<?
//--language name--//
$lang = array();
$lang['title']="gz";
$lang['main']="主页";
$lang['login']="登入";
$lang['help']="帮助";
$lang['tabmessage']="讯息";?>