IE6及一下输出xml为空,firefox下正常,怎么回事?
<?php
require_once dirname(__FILE__)."/../config.inc";
require_once "$path_prefix/api/Content/Content.php";
require_once "$path_prefix/api/ContentCollection/ContentCollection.php";
require_once "$path_prefix/web/functions.php";
$rss_display_no = ConfigVariable::get("rss_display_no");
$display_num = get_rss_display_num($_GET['type'],$rss_display_no);
$uid = (int)@$_GET['uid'];
if ($uid) {
$feed = Content::get_content_feed_for_user($uid, $display_num);
}
else if ($_GET['type'] == 'all') {
$feed = Content::get_content_feed_for_user("",$display_num);
}
else if ($_GET['type'] == 'group_content' && $_GET['gid']) {
$feed = ContentCollection::get_feed_for_content_collection($_GET['gid'],$display_num);
}
else if ($_GET['type'] == 'group_forum') {
$feed = ContentCollection::get_feed_for_content_collection($_GET['gid'],$display_num,'group_forum');
}
else {
header("HTTP/1.0 404 Not Found");
?>No feed available at this address. Were you looking for the community blog feed?<?
exit;
}
header("Content-Type: application/xml");
print($feed); ?>
输出内容无中文,文件编码都是ANSI,
服务端为windows,在windows下浏览:在ie6,ie7,firefox都正常.(php版本5.2.1,apache2.0.59,默认字符集为utf-8)
服务端为linux,在windows下浏览:在ie6下显示为空,ie7下正常,firefox正常.(php版本5.0.4,apache2.0.54,默认字符集为utf-8)
在firefox查看了源代码是这样的:
<?xml version="1.0"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"><channel><title>(TestCommon) TestCommon Network's Latest Blog</title><description>This is home network for TestCommon</description><link>http://www.mytcdev.com</link><lastBuildDate>Mon, 25 Feb 2008 09:02:57 +0000</lastBuildDate><item><title>post from linda</title><description>post from linda</description><link>http://www.mytcdev.com/content.php?cid=105</link><guid>http://www.mytcdev.com/content.php?cid=105</guid><pubDate>Mon, 18 Feb 2008 05:02:28 +0000</pubDate></item></channel></rss>
为什么在ie6下一直为空呢?