PHP如何使用正则表达式解析RSS数据?
- 内容介绍
- 文章标签
- 相关推荐
本文共计470个文字,预计阅读时间需要2分钟。
将伪原创代码以下内容进行简化:
php复制代码代码如下:$xmfile='news/'.date('YmdH').'.xml';$sourcexml='http://www.chinanews.com.cn/rss/scroll-news.xml';if (!file_exists($xmlfile)) { $str=@file_get_contents($sourcexml) or die('加载文件时出错。'); $fp=fopen($xmlfile, 'w');}
$xmlfile = 'news/'.date('YmdH').'.xml';
$sourcexml = 'www.chinanews.com.cn/rss/scroll-news.xml';
if( !file_exists($xmlfile) ) {
$str = @file($sourcexml) or die('加载文件时出错。
本文共计470个文字,预计阅读时间需要2分钟。
将伪原创代码以下内容进行简化:
php复制代码代码如下:$xmfile='news/'.date('YmdH').'.xml';$sourcexml='http://www.chinanews.com.cn/rss/scroll-news.xml';if (!file_exists($xmlfile)) { $str=@file_get_contents($sourcexml) or die('加载文件时出错。'); $fp=fopen($xmlfile, 'w');}
$xmlfile = 'news/'.date('YmdH').'.xml';
$sourcexml = 'www.chinanews.com.cn/rss/scroll-news.xml';
if( !file_exists($xmlfile) ) {
$str = @file($sourcexml) or die('加载文件时出错。

