Autor Zpráva
flying gentleman
Profil
ahojte,mam tenhle skript:


<?php
header('content-type: text/xml');
$nadpis=$rs['nadpis'];
$nadpisBez=strip_tags($nadpis);
$clanek=$rs['article'];
$clanekBez=strip_tags($clanek);
echo"<?xml version='1.0' encoding=\"windows-1250\"?>
<rss version=\"0.91\">
<channel>
<title>Mišulínek.wz.cz</title>
<link>http://misulinek.wz.cz</link>
<description>Osobní stránky Michala Zimmermanna</description>
<language>cs</language>
<webMaster>zimmi@centrum.cz</webMaster> ";
$dbconn=MySQL_Connect("localhost","root","");
$dbname=MySQL_Select_DB("weblog");
$query="select * from articles order by id desc ";
$result=mysql_query($query,$dbconn) or die("SQL dotaz nešlo provést");
$num = mysql_num_rows($result);
while ($num=mysql_fetch_array($result))
{
echo "<item>
<title>".$nadpisBez."</title>
<description>".$clanekBez."</description>
<pubDate>".$rs["date"]."</pubDate>
</item>";
}
mysql_free_result($result);
echo" </channel>
</rss>";
?>

chybu mi to nehaze zadnou, ale problem je v tom, ze kdyz ten soubor otevru,pise jen xml tagy, a ne zadny obsah ani titulek ani datum:((
pls pomoc.mozna vam pomuze adresa
Hugo
Profil
Me to v opere funguje, jakou pouzivas RSS ctecku??
flying gentleman
Profil
ja kdyz ten soubor otevru normalne v prohlizeci tak pise jen ty tagy, a to je ta chyba ne?
Hugo
Profil
Neni, pokud nemas v prohlizeci integrovanou RSS ctecku, tak se ti zobrazi jen struktura xml. Zkus treba operu nebo neco co umi rss.
flying gentleman
Profil
tu uz jsem zkusil, a prisel jsem na to, ze mi to nepise zadny clanky, napise mi to jen nejakej cas, a ja ani nevim ceho
Leo
Profil
Jestli myslite tohle

http://misulinek.wz.cz/rss.php

Tak Firefox pise

XML Parsing Error: not well-formed
Location: http://misulinek.wz.cz/rss.php
Line Number 8, Column 57: <webMaster>zimmi@centrum.cz</webMaster> <font color=ff0000><br />

Leo
flying gentleman
Profil
jo, to je chyba kterou mi tam haze apache a obarvuje si ji na ff0000
flying gentleman
Profil
jo hosi a jsem za vodou, uz to funguje
Toto téma je uzamčeno. Odpověď nelze zaslat.

0