下記のコードを使用して自分のサイトにRSSフィードを作成していますが、私が追加したいのは、個人用のアイコンをブラウザのURLアドレスバーに表示することです。rssサイトにURLアイコンを追加する方法
<?php define ('CONFIG_SYSTEM_URL','http://www.mydomain.tk/');
require_once('feedcreator/feedcreator.class.php');
$feedformat='RSS2.0';
header('Content-type: application/xml');
$rss = new UniversalFeedCreator();
$rss->useCached();
$rss->title = "daily news feed";
$rss->cssStyleSheet='';
$rss->description = 'this feed is from me';
$rss->link = CONFIG_SYSTEM_URL;
$rss->syndicationURL = CONFIG_SYSTEM_URL.'feed.php';
$articles=new itemList();
foreach ($articles as $i) {
$item = new FeedItem();
$item->title = sprintf('%s',$i->title);
$item->link = CONFIG_SYSTEM_URL.'item.php?id='.$i->dbId;
$item->description = $i->Subject;
$item->date = $i->ModifyDate;
$item->source = CONFIG_SYSTEM_URL;
$item->author = $i->User;
$rss->addItem($item);
}
print $rss->createFeed($feedformat);
?>
下記のコードは、私がこのエリアに追加すると他のPHPページでも動作しますが、それをRSSページに追加するとエラーが発生します。私が間違っていないのは、RSSがXMLとしてレンダリングされているからです。
<head> <title>Other page works with icon but rss wont</title> <link rel="shortcut icon" href="images/myicon.ico"> </head>
誰もがRSSの場合はURLバーにアイコンを変更する方法についての私を助けることができますか?ありがとう。
可能性のある複製http://stackoverflow.com/questions/8782782/how-can-i-get-an-icon-for-my-rss-feed –
こんにちはsteve、投稿する前に、私はすでにfaviconを試しました.icoものだが、解決策ではないようだ。私はルートディレクトリに私のfavico.icoを持っています。 –