欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

php生成rss订阅_PHP教程

程序员文章站 2022-05-12 18:14:29
...

php生成rss订阅

//$news为重数据库里取出的数组
$host = $_SERVER['HTTP_HOST'];
$xmls = '
';
foreach ($news as $keys => $values) {
//foreach ($values as $key1 => $value1) {
$xmls .= "".$values["title"]."";
$xmls .= "http://$host/news.php?id=".$values['id']."";
//$xmls .= "";
//$xmls .= "".$values["addtime"]."";
$xmls .= "$host";
//$xmls .= "".$values["addtime"]."";
$xmls .= "";
//$xmls .= "";
//}
}
$xmls .= "";
echo $xmls;

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1075139.htmlTechArticlephp生成rss订阅 //$news为重数据库里取出的数组 $host = $_SERVER[HTTP_HOST]; $xmls = ?xml version=1.0 encoding=utf-8? rss version=2.0 xmlns:dc=http://purl.org/dc/elemen...
相关标签: php生成rss订阅