Use PHP to generate XML files-php Tutorial

Source: Internet
Author: User
For help, PHP is used to generate XML files. my website uses a FLASH to load XML files for online music playback. it is very troublesome to upload music and modify XML files through FTP each time ,,, I want to use PHP to dynamically update XML files !!! The XML of the website is as follows: the content of albumname comes from the data table "lanmu", and the content of songname comes from the data table "songs ",!!! The xml Path is playerxmlli. you can use PHP to generate an XML file.
My website uses a FLASH to load XML to play music online. it is very troublesome to upload music and modify XML with FTP each time ,,, I want to use PHP to dynamically update XML files !!!
The XML of the website is as follows:
The content of album name comes from the data table "lanmu", and the content of song name comes from the data table "songs ",!!! The xml Path is/player/xml/list. xml.
Because this XML is a two-tier query of two tables, I don't know how to write it !!
Thank you !! Because I am not a Cainiao, please give the complete code !!






Songs/song3.mp3
Songs/song3.mp3
Songs/song3.mp3
Songs/song3.mp3





Songs/song3.mp3




------ Solution --------------------
Well, the original method I used is file operation functions such as fopen fwrite.
------ Solution --------------------
You must give at least the relationship between two tables.
------ Solution --------------------
Set the file attribute to writable, and then file_put_contents ($ xml_file_name, $ xmlcurrent );
You can.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.