时间:2021-07-01 10:21:17 帮助过:22人阅读
setting1 value setting2 value setting3 value .... .... ....
// CREATE$config = new SimpleXmlElement('');$config->setting1 = 'setting1 value'; $config->saveXML('config.xml'); // READ$config = new SimpleXmlElement('config.xml');echo $config->setting1;echo $config->asXml();// UPDATE$config->setting1 = 'new value';$config->setting2 = 'setting2 value';echo $config->asXml();// DELETEunset($config->setting1);$config->setting2 = NULL;echo $config->asXML();unlink('config.xml');