Home > Backend Development > PHP Tutorial > Generate rss subscription in php_PHP tutorial

Generate rss subscription in php_PHP tutorial

WBOY
Release: 2016-07-12 09:04:06
Original
1103 people have browsed it

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...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template