![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
Código PHP:
<?
include"include/config.php";
$conectar = conectar_bd();
echo $conectar;
$perPage = 15;
Header("Content-type: text/xml");
echo '<'; ?>?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
"h t t p : / / my.netscape.com/publish/formats/rss-0.91.dtd">
<rss version="0.91">
<channel>
<title><?=$website_titulo;?></title>
<link><?=$website_link;?></link>
<description><?=$website_descripcion;?></description>
<language><?=$website_idioma;?></language>
<?
if($S){
$S = substr($S, 0, -5);
$S = str_replace('-', ' ', $S);
$select = mysql_query("SELECT * FROM $sql_tabla_noticias WHERE title='$S');
}else {
$select = mysql_query("SELECT * FROM $sql_tabla_noticias ORDER BY id DESC LIMIT 0,$perPage); //En esta linea me dice constantemente que está el error :S
}
while($row = mysql_fetch_array($select)) {
echo "\n";
echo " <item>\n";
echo " <title>".$row[title]."</title>\n";
$desc = $row[news];
$desc = str_replace("\n",'',$desc);
$desc = str_replace("\r",'',$desc);
if(!$S){ $desc = substr($desc,0,233)."..."; }
$desc = htmlentities($desc);
echo " <description>".$desc."</description>\n";
echo " <link>".$_SERVER['SERVER_NAME']."rss/".$row[title].".html</link>\n";
echo " </item>\n";
}
?>
</channel>
</rss>