Skip to content

Instantly share code, notes, and snippets.

@saasindustries
Created January 18, 2021 09:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
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.';
}
else{
echo 'Error in file generating';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment