Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
$xmlFile = ‘MovieReview.xml’;
$handle = fopen($xmlFile, ‘w’) or die('Unable to open the file: '.$xmlFile);
if(fwrite($handle, $xml_content)) {
echo 'Successfully written to an XML file.';
echo 'Error in file generating';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment