[Feed RSS]
你好,我有一个博客,我创建了这个rss文件,在其中放置了指向照片的链接,但是使用rss阅读器时,我无法查看它们。我哪里错了?

    <? php
$ connection = mysql_connect ( "xxx ", " xxx" , "xxx ");
mysql_select_db ( "xxx ", $ connection ) ;
$ selezionedati = "SELECT * FROM photos ORDER BY ID DESC LIMIT 20" ;
$ query = mysql_query ($ selezionedati ) or die ( mysql_error ());

header (" Content-type: text / xml ");

echo (" <rss version=\"2.0\"> ");
echo (" <channel> ");
echo (" <title> People </ title >") ;
echo (" <link> http://espanici/archivio.php </ link >") ;
echo (" <description> people < / description> ");
echo " <copyright> Copyright 2013 < / copyright > \ n";
echo " <docs> http://espanici < / docs > \ n";
echo " <managingEditor> espanici ( emanuele ) </ managingEditor > \ n";
echo " <webMaster> espanici.com ( emanuele ) </ webMaster > \ n";
echo (" <language> IT- en </ language >") ;
while ($ array = mysql_fetch_array ( $ query )) {
extract ( $ array ) ;
echo " <item>
<title> $ name </ title>
<link> http://espanici/tabella.php?id = $ id </ link>
<description> $ name < / description>
<image>
<link> http://espanici/tabella.php?id = $ id / </ link>
<url> http://espanici/ $ location < / url >
<title> $ name </ title>
</ image>
</ item > " ;
}
echo " < / channel > </ rss >" ;
? >


通知插入工作。当我单击链接时,将打开确切的卡片,但我想插入照片。我使用了指向照片正确链接的代码,但应用程序看不到它。
这是页面http://espanici.altervista.org/antonio/fedd.php这是网址

其中$ location是图像的路径

最佳答案

我通过输入以下代码解决了它。

<description><![CDATA[<img src=\"http://espanici/$location\" width=\"57\" height=\"57\" />]]></description>

10-05 20:46
查看更多