cardio5643 Posted July 29, 2009 Share Posted July 29, 2009 This code creates the file and writes 'test' to its contents <?php $xmlFile = "../etc/someXMLfile.xml"; $xmlHandle = fopen($xmlFile, "w"); fwrite($xmlHandle, 'test'); fclose($xmlHandle); ?> This code will create the file but have NO contents. Its seems like as long as simplexml is involved the script is crashing. <?php $xmlFile = "../etc/someXMLfile.xml"; $xmlHandle = fopen($xmlFile, "w"); $flashXML = simplexml_load_string('<root><number>1</number></root>'); fwrite($xmlHandle, 'test'); fclose($xmlHandle); ?> ANY IDEAS? Link to comment https://forums.phpfreaks.com/topic/167966-simplxml-fwrite-very-strange/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.