Bonjours a tous…
J’ESSAIE d’installer un flux rss dynamique (qui affiche les news postées dans ma db) sur mon site… Mais quand j’ouvre mon flux, j’ai l’erreur suivante :
http://www.neo-rammstein.com/rss.php
Voici le code de mon flux :
<? header('Content-type: text/xml'); ?>
<?php
mysql_connect("localhost","db","pw");
mysql_select_db("db");
$sql = mysql_query("SELECT * FROM news ORDER BY id DESC");
echo '<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
<channel>
<title>Neo-Rammstein.com</title>
<link><lien>http://www.neo-rammstein.com</lien></link>
<description>Les news postées par Neo-Rammstein.com</description>';
while ($data = mysql_fetch_assoc($sql) ){
echo '<item>
<title>' .$data['titre']. '</title>
<link>http://www.neo-rammstein.com</link>
<description>' .$data['contenu']. '</description>
</item>';
}
echo '</channel>
</rss>';
?>
J’espere que quelqu’un va pouvoir m’aider Merci