Home  >  Article  >  Backend Development  >  用PHP生成XML文件

用PHP生成XML文件

WBOY
WBOYOriginal
2016-06-13 13:36:14742browse

求助用PHP生成XML文件
我的网站是用一个FLASH加载XML实现音乐在线播放,每次用FTP上传音乐和修改XML很麻烦,,,想用PHP实现动态更新XML文件某再次求助各位高手!!!
现在网站的XML如下:
其中,album name的内容来自数据表“lanmu”,song name的内容来自数据表“songs”,!!!xml路径是/player/xml/list.xml
因为这个XML是两层而且是查询两个表 所以不知道怎么写!!
谢谢各位!!由于本人菜鸟的不行,,恳请最好给出完整代码!!






  songs/song3.mp3
  songs/song3.mp3
  songs/song3.mp3
  songs/song3.mp3
  
 
 


 
  songs/song3.mp3
 




------解决方案--------------------
呵呵,我用的很原始的方法,就是fopen fwrite之类文件操作函数来搞
------解决方案--------------------
你至少需要给出两个表的关系
------解决方案--------------------
把文件属性设置为可写,然后file_put_contents($xml_file_name, $xmlcurrent);
就可以了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn