eekeek Posted October 4, 2010 Share Posted October 4, 2010 I'm lost on this one. This code works fine in Firefox, but not my IE8. I think it has something to do with the <?php echo '<?xml version="1.0" encoding="utf-8"?>'; ?> line, but i'm not sure. IE says "Internet Explorer cannot display this feed" and "A name contained an invalid character. Line: 7 Character: 701." Any ideas? <?php header('Content-Type: text/xml'); ?> <?php echo '<?xml version="1.0" encoding="utf-8"?>'; ?> <?php include('../vars.php'); ?> <rss version="2.0"> <channel> <title>Newsfeed</title> <description>News and Updates</description> <link>http://www.example.com</link> <language>en-us</language> <?php require_once("../conn.php"); $query = "SELECT * FROM news"; $data = mysqli_query($db, $query); while ($row = mysqli_fetch_array($data)) { echo '<item>'; echo ' <title>' . $row['title'] . ' - ' . substr($row['content'], 0, 32) . '...</title>'; echo ' <link>http://www.example.com/new.php?newsid=' . $row['newsid'] . '</link>'; //echo ' <pubDate>' . $row['date'] . '</pubDate>'; echo ' <description>' . $row['content'] . '</description>'; echo '</item>'; } ?> </channel> </rss> Link to comment https://forums.phpfreaks.com/topic/215158-rss-feed-ie8/ Share on other sites More sharing options...
BlueSkyIS Posted October 4, 2010 Share Posted October 4, 2010 what's in ../vars.php? Link to comment https://forums.phpfreaks.com/topic/215158-rss-feed-ie8/#findComment-1119096 Share on other sites More sharing options...
eekeek Posted October 5, 2010 Author Share Posted October 5, 2010 Nothing important or needed for this script. I should of removed it for this post. Also, if removed it doesn't change the feeds behavior in IE. Still not sure what is going on... Link to comment https://forums.phpfreaks.com/topic/215158-rss-feed-ie8/#findComment-1119293 Share on other sites More sharing options...
BlueSkyIS Posted October 5, 2010 Share Posted October 5, 2010 what's on Line: 7 Character: 701? Link to comment https://forums.phpfreaks.com/topic/215158-rss-feed-ie8/#findComment-1119297 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.