Billets du flux RSS ne s'affichent pas ...

nonsense -  
 nonsense -
Bonsoir,
j'aimerais bien savoir pourquoi les billets de mon flux RSS ne s'affichent pas. Il y a juste le titre du flux et la description qui figurent. Seuls les articles (titre, date...) ne sont pas affichés. C'est étrange. Voici le code :

<?php
$host = "localhost";
$username = "***";
$password = "***";
$bdd_name = "***";
mysql_connect($host, $username, $password);
mysql_select_db($bdd_name);
 
function cleanText($intext)
{
    return utf8_encode(htmlspecialchars(stripslashes(nl2br($intext))));
}
 
header("Content-Type: text/xml;charset=utf-8");
 
$query = mysql_query('SELECT * FROM articles ORDER BY datep DESC');
$i = 0;
 
/* Code XML */
echo '<?xml version="1.0" encoding="utf-8" ?>';
echo '<rss version="2.0">';
echo '<channel>';
echo '<title>Flux RSS des news</title>';
echo '<link>http://monsite.com/</link>';
echo '<description>Actualite</description>';
echo '<language>fr-FR</language>';
echo '<managingEditor>truc@truc.com</managingEditor>';
echo '<webMaster>truc@truc.com</webMaster>';
 
while($row = mysql_fetch_assoc($query) and $i < 27)
{

	if($row['valider'] == 'oui')
	{
    $title = cleanText($row['titre']);
    $link = 'http://monsite.com/article.php?id='.$row['id'].'';
    $description = cleanText($row['contenu']);
    $pubDate = $row['datep']; 
 
    echo '<item>';
    echo '<title>'.$title.'</title>';
    echo '<link>'.$link.'</link>';
    echo '<pubDate>'.$pubDate.'</pubDate>';
    echo '</item>';
    $i++;
	}
}
 
echo '</channel>';
echo '</rss>';
 
/* Fin du code XML */
 
mysql_close(); 
?>


Merci par avance pour votre aide.

étrange.

1 réponse

nonsense
 
Personne ? ;_______;
0