Thread: Creating Files
- Join Date
- Dec 2008
- Blog Entries
Creating Files 30 Jan 2009 @ 20.46
I need to use PHP to create an XML file and then write data to it - the data the program figures out, but I'm stuck on how to:
1) Create an XML file.
2) Write the data to it.
3) Prompt the user to save it.
If I cant create XML files, then a normal txt file would be fine, but XML prefered.
What are my options?Site: jackfranklin.co.uk Blog: ispeakwebstuff.co.uk Project: learnitscreencasts.co.uk
31 Jan 2009 @ 07.39
PHP: domxml_new_doc - Manual
That how to create a fresh xml document, i'm assuming that everytime it runs you'll want to create a new xml document rather than erase/overwrite the last one?
I'm not very good at explaining, but this should help you understand writing xml data.
And for the 3rd question, could you just write the xml file, and then prompt the user to save it, if they decline just have the already existing file deleted?
Although i very much doubt that's the best or most sound approach.
Last edited by bocaj; 31 Jan 2009 at @ 07.41.
- By ljackson in forum General Design & Development IssuesReplies: 11Last Post: 8 Jul 2010, @ 08.58
- By Ol'Canuck in forum Just Starting Out - Help Me!Replies: 13Last Post: 25 Feb 2010, @ 19.34
- By Wrams in forum Computer Hardware & SoftwareReplies: 0Last Post: 13 Sep 2009, @ 21.35