Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $file_contents = '<?xml version="1.0" ?><yourroot><item>some content</item></yourroot></xml>';
- // Open or create a file (this does it in the same dir as the script)
- $my_file = fopen("myfile.xml", "w");
- // Write the string's contents into that file
- fwrite($my_file, $file_contents);
- // Close 'er up
- fclose($my_file);
Advertisement
Add Comment
Please, Sign In to add comment