代码如下:$xmlfile = ‘news/’.date(‘YmdH’).’.xml’; $sourcexml = ‘http://www.chinanews.com.cn/rss/scroll-news.xml’; if( !file_exists($xmlfile) ) { $str = file($sourcexml) or die(‘加载文件时出错。’); $fp = fopen($xmlfile,’w’) or die(‘写缓存失败!’); fputs($fp,$str); fclos