Home  >  Article  >  Backend Development  >  要根据数据库查询结果生成xml文件,用thinkphp怎么生成

要根据数据库查询结果生成xml文件,用thinkphp怎么生成

WBOY
WBOYOriginal
2016-06-13 10:07:23775browse

要根据数据库查询结果生成xml文件,用thinkphp如何生成
这个怎么做

------解决方案--------------------
首先就是声明一个header为xml
其次就是对应的生成你希望的节点..
需要注意编码,和节点闭合.
------解决方案--------------------
我生成XML的时候没想那么复杂

就用字符拼接就可以了

很简单的
要么也可以用simplexml,用thinkphp不清楚
------解决方案--------------------
我一般用phpexcel类

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