PHP interesse |
|
als ik rss maak, en ga ik naar het rss bestand dan krijg ik dit:
De XML-pagina kan niet worden weergegeven
Kan XML-invoer niet lezen met opmaakmodel XSL. Herstel de fout en klik vervolgens op de knop Vernieuwen of probeer het later opnieuw.
Ik heb mijn rss/news.xml op chmod 777 staan.... en de dir ook
hier mij phpcode:
<?php
require_once ("config.php");
require_once ("classes.inc.php");
$db = new mysql;
$db->makeConnection(MYSQL_HOST, MYSQL_USERNAME, MYSQL_PASS, MYSQL_DB);
$soutput = '<?xml version="1.0" encoding="iso-8859-1"?>'."\n\n";
$soutput .= '<rss version="2.0">'."\n";
$soutput .= " <channel>\n";
$soutput .= " <title>Energy-Gaming.org News</title>\n";
$soutput .= " <link>http://www.energy-gaming.org</link>\n";
$soutput .= " <description>News from Energy-Gaming.org</description>\n";
$soutput .= " <generator>Energy Websolutions RSS Maker v1.0</generator>\n";
$soutput .= " <copyright>Copyright Energy-Gaming.org</copyright>\n";
$soutput .= " <lastBuildDate>Tue, 14 Mar 2006 12:12:50 +0100</lastBuildDate>\n";
$query = $db->query("SELECT id, title FROM news ORDER BY id DESC LIMIT 0,5");
while($sql = $db->dump($query))
{
$soutput .= " <item>\n";
$soutput .= " <id>".$sql["id"]."</id>\n";
$soutput .= " <link>site.php?p=news&action=comments&id=".$sql["id"]."</link>\n";
$soutput .= " <title>".htmlentities($sql["title"])."</titel>\n";
$soutput .= " </item>\n";
}
$soutput .= " </channel>\n";
$soutput .= "</rss>";
if(!$rfile = fopen("rss/news.xml", "w+"))
{
echo "[<strong>Error</strong>] - Can't open the file";
}
else
{
if(!fwrite($rfile, $soutput))
{
echo "[<strong>Error</strong>] - Can't write the ouput";
}
else
{
echo "Succesfully writen <a href='rss/news.xml'><strong>news.xml</strong></a>";
}
}
echo "<br /><textarea style='width: 780px; height: 100%;'>".$soutput."</textarea>";
?>
<?php require_once ("config.php"); require_once ("classes.inc.php"); $db->makeConnection(MYSQL_HOST, MYSQL_USERNAME, MYSQL_PASS, MYSQL_DB); $soutput = '<?xml version="1.0" encoding="iso-8859-1"?>'."\n\n"; $soutput .= '<rss version="2.0">'."\n"; $soutput .= " <channel>\n"; $soutput .= " <title>Energy-Gaming.org News</title>\n"; $soutput .= " <link>http://www.energy-gaming.org</link>\n"; $soutput .= " <description>News from Energy-Gaming.org</description>\n"; $soutput .= " <generator>Energy Websolutions RSS Maker v1.0</generator>\n"; $soutput .= " <copyright>Copyright Energy-Gaming.org</copyright>\n"; $soutput .= " <lastBuildDate>Tue, 14 Mar 2006 12:12:50 +0100</lastBuildDate>\n"; $query = $db->query("SELECT id, title FROM news ORDER BY id DESC LIMIT 0,5"); while($sql = $db->dump($query)) { $soutput .= " <item>\n"; $soutput .= " <id>".$sql["id"]."</id>\n"; $soutput .= " <link>site.php?p=news&action=comments&id=".$sql["id"]."</link>\n"; $soutput .= " <title>".htmlentities($sql["title"])."</titel>\n"; $soutput .= " </item>\n"; } $soutput .= " </channel>\n"; $soutput .= "</rss>"; if(!$rfile = fopen("rss/news.xml", "w+")) { echo "[<strong>Error</strong>] - Can't open the file"; } else { { echo "[<strong>Error</strong>] - Can't write the ouput"; } else { echo "Succesfully writen <a href='rss/news.xml'><strong>news.xml</strong></a>"; } } echo "<br /><textarea style='width: 780px; height: 100%;'>".$soutput."</textarea>"; ?>
http://www.energy-gaming.org/rss.php
Weet iemand de fout ???
|