I'm creating XML with php's native DOMDocument functionality. When I try save the XML it doesn't appear on the server and I can't figure out why.
<?php // Initiate the XML $doc = new DOMDocument('1.0', 'UTF-8'); $doc->formatOutput = true; // Code that creates XML elements and child elements // Save the XML echo $doc->saveXML(); $doc->save("file.xml"); ?>
The above should work but doesn't. I've made sure that DOM is enabled which it is.
Anyone have any ideas why this wouldn't be saving the XML to the server?