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? Quote Link to comment https://forums.phpfreaks.com/topic/167991-nobody-can-figure-this-out/ Share on other sites More sharing options...
Maq Posted July 29, 2009 Share Posted July 29, 2009 Try turning error reporting on. ini_set ("display_errors", "1"); error_reporting(E_ALL); Quote Link to comment https://forums.phpfreaks.com/topic/167991-nobody-can-figure-this-out/#findComment-886042 Share on other sites More sharing options...
cardio5643 Posted July 29, 2009 Author Share Posted July 29, 2009 Try turning error reporting on. ini_set ("display_errors", "1"); error_reporting(E_ALL); where would i view these errors? Quote Link to comment https://forums.phpfreaks.com/topic/167991-nobody-can-figure-this-out/#findComment-886075 Share on other sites More sharing options...
Maq Posted July 29, 2009 Share Posted July 29, 2009 Try turning error reporting on. ini_set ("display_errors", "1"); error_reporting(E_ALL); where would i view these errors? Browser, terminal, wherever you're running it from. Make sure you place those lines directly after your opening <?php tag. Quote Link to comment https://forums.phpfreaks.com/topic/167991-nobody-can-figure-this-out/#findComment-886082 Share on other sites More sharing options...
cardio5643 Posted July 29, 2009 Author Share Posted July 29, 2009 Try turning error reporting on. ini_set ("display_errors", "1"); error_reporting(E_ALL); where would i view these errors? Browser, terminal, wherever you're running it from. Make sure you place those lines directly after your opening <?php tag. Maybe I am not doing this right. Those lines were added to my file, I went to my browser, clicked the button that calls the script, the html reloaded as it should, back to the same page, and thats it. I dont get an error in the browser, or the command line. Nothing... What is going on?? Quote Link to comment https://forums.phpfreaks.com/topic/167991-nobody-can-figure-this-out/#findComment-886199 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.