请教:关于PHP、XML、XSL的问题(50分)

  • 主题发起人 formater
  • 开始时间
F

formater

Unregistered / Unconfirmed
GUEST, unregistred user!
我在PHP中使用(XML+XSL)输出HTML,取材于PHP MANUAL中的一个例子,如下:
<?php
$xh = xslt_create();
$result = xslt_process($xh, 'f:/11j/kk.xml', 'f:/11j/kk.xsl');
if (!$result) {
die(sprintf("Cannot process XSLTdo
cument [%d]: %s",xslt_errno($xh), xslt_error($xh)));
}
print($result);
xslt_free($xh);
?>
运行后,浏览器中显示如下:
Cannot process XSLTdo
cument [62]: unknown encoding ''
也就是说:XSLT解析时,有不可知的编码。
于是我在"kk.xsl"和"kk.xml"中修改encoding="GB2312"为encoding="ISO-8859-1",并修改所有中文为英文。
浏览器仍然显示:Cannot process XSLTdo
cument [62]: unknown encoding ''
请问如何解决?
 
用utf-8看
---
http://www.8421.org
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
825
SUNSTONE的Delphi笔记
S
顶部