maximus87

Untitled

Jun 25th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. $file_contents = '<?xml version="1.0" ?><yourroot><item>some content</item></yourroot></xml>';
  2.  
  3. // Open or create a file (this does it in the same dir as the script)
  4. $my_file = fopen("myfile.xml", "w");
  5.  
  6. // Write the string's contents into that file
  7. fwrite($my_file, $file_contents);
  8.  
  9. // Close 'er up
  10. fclose($my_file);
Advertisement
Add Comment
Please, Sign In to add comment