Zoom Posted July 16, 2009 Report Share Posted July 16, 2009 Rakājos Googlē, bet atradu tik XML satura izdrukāšanu. Vai ir iespējams ar simpleXML saglabāt XML failā jaunu ierakstu? Paldies. Quote Link to comment Share on other sites More sharing options...
marrtins Posted July 16, 2009 Report Share Posted July 16, 2009 Jā var. <?php $xml = simplexml_load_file($file); // šeit vajadzīgās manipulācijas - addChild, addAttribute, utt utt $xml->asXML($file); ?> Tikai šāds piegājiens nav drošs multi-user modē. Quote Link to comment Share on other sites More sharing options...
Zoom Posted July 16, 2009 Author Report Share Posted July 16, 2009 Tas ir domāts kā katram lietotājam savs ieraksts piešūts? Quote Link to comment Share on other sites More sharing options...
marrtins Posted July 16, 2009 Report Share Posted July 16, 2009 Nesapratu Tavu jautājumu. Quote Link to comment Share on other sites More sharing options...
Zoom Posted July 16, 2009 Author Report Share Posted July 16, 2009 "multi-user modē" tas ir kā piemēram reģistrētam lietotājam glabājās privātās ziņas? Man vajag tik no Flash saglabāt tekstu. Quote Link to comment Share on other sites More sharing options...
marrtins Posted July 16, 2009 Report Share Posted July 16, 2009 (edited) Multi user modē bija domāts, piemēram, kad daudz lietotāji vienlaicīgi modificē to failu - var sanākt scheissīte, ka viens otru pāraksta un/vai sabojā to failu. Domājams, ka gadījumā ar Flash ir visai liela iespēja sabojāt to XML failu. Par Tavu datu struktūru es neko nezinu. Edited July 16, 2009 by marrtins Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.