如何创建一个RSS提要并显示它? [英] How to create an RSS feed and display it?

查看:112
本文介绍了如何创建一个RSS提要并显示它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个网站上,我为一家电台维护着他们有一个显示新闻文章的页面。现在新闻发布在一个html页面,然后通过包含所有导航的php页面读取。我被要求将它改成RSS feed。我该怎么做呢?我知道如何制作XML文件,但编辑新闻文件的人不是技术性的,需要一个所见即所得的编辑器。 XML是否有WYSIWYG编辑器?一旦我拥有饲料,我如何在我的网站上展示它?我在这个网站上使用PHP,所以PHP解决方案将是首选。 我决定,而不是试图找到一个所见即所得对于XML,我会让新闻编辑继续以HTML格式上传新闻。我最终编写了一个PHP程序来查找< p> < / p> 标签并创建了一个XML文件不在其中。

On a website I am maintaining for a radio station they have a page that displays news articles. Right now the news is posted in an html page which is then read by a php page which includes all the navigation. I have been asked to make this into and RSS feed. How do I do this? I know how to make the XML file but the person who edits the news file is not technical and needs a WYSIWYG editor. Is there a WYSIWYG editor for XML? Once I have the feed how do I display it on my site? Im working with PHP on this site so a PHP solution would be preferred.

解决方案

I decided that instead of trying to find a WYSIWYG for XML that I would let the news editor continue to upload the news as HTML. I ended up writing a php program to find the <p> and </p> tags and creating an XML file out of it.

这篇关于如何创建一个RSS提要并显示它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆