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

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

WBOY
Release: 2016-06-13 13:47:36
Original
1120 people have browsed it

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

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

就用字符拼接就可以了

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template