append"/> append">
Maison > Article > développement back-end > xml加个节点如何写
xml加个节点怎么写
xml 结构如下
php如下
$note = simplexml_load_file("a.xml");
$note->appendChild(new DOMElement("time","aaa"));
$note = simplexml_load_file("a.xml");<br />$note->addChild("time","aaa");<br />file_put_contents('a.xml', $note->asXML());