日期:2014-05-17 浏览次数:20569 次
include(dirname(__FILE__)."/xmlparse.php"); $arr = array(1,"name","admin",100); $contXML = dump_xml_config($arr, "xml", "utf-8"); //放入文件 file_put_contents_safe("/path/test.xml",$contXML,"w"); echo $contXML; #源码 #<?xml version="1.0" encoding="utf-8"?> #<xml> # <0>1</0> # <1>name</1> # <2>admin</2> # <3>100</3> #</xml>
------解决方案--------------------