[Solved] Creating/Writing an XML file in PHP?
According to your code, you’re already building the XML content yourself. XML files are just regular text files, so in this case you don’t need any of the special XML functions that validate and render. Instead, you can simply save your text to the .xml file: file_put_contents(‘/tmp/test.xml’, $xmlBody); file_put_contents allows you to forego all the … Read more