搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Can I make a database call from within my rss.xml file?

  • 1 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 guigs

more options

I have a rss.xml file for my web site which works just fine, but has to be manually updated each time my web site blog is updated. Is it possible to insert a sql query in my rss.xml file so it can pull the updated info automatically from my mysql db?

I know the rss.xml file will have to be renamed with a .php extension, will it still work?

I have a rss.xml file for my web site which works just fine, but has to be manually updated each time my web site blog is updated. Is it possible to insert a sql query in my rss.xml file so it can pull the updated info automatically from my mysql db? I know the rss.xml file will have to be renamed with a .php extension, will it still work?

所有回覆 (1)

more options

I think this is what you are looking forhttp://dev.mysql.com/doc/refman/5.1/e.../xml-functions.html They are called XML functions that you can set up in an .php file to export the updated file name as rss.xml, though I think it will overwrite anything already in the .xml file.

If you care to dabble, you may already be a master, but there are some cool rss tutorials here http://www.w3schools.com/rss/

Hope this helps!