Results 1 to 2 of 2

Thread: Creating Files

  1. #1
    Trusted Guru Jack Franklin's Avatar
    Join Date
    Dec 2008
    Posts
    426
    Blog Entries
    4

    Default Creating Files 30 Jan 2009 @ 20.46

    Hey guys,

    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
    I'm available for 1 to 1 lessons on HTML/CSS/PHP/Javascript/jQuery/Photoshop/Fireworks so please PM Me!
      Reply With Quote

  2. #2
    Member bocaj's Avatar
    Join Date
    Jan 2009
    Posts
    185

    Default 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.

    http://uk2.php.net/manual/en/book.xmlwriter.php

    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.
      Reply With Quote

Similar Threads

  1. Combining Jquery files
    By Jacob in forum Javascript Libraries
    Replies: 2
    Last Post: 25 Mar 2011, @ 12.26
  2. using gzip to compress files.
    By ljackson in forum General Design & Development Issues
    Replies: 11
    Last Post: 8 Jul 2010, @ 08.58
  3. loading js files in an ajax script
    By stu2000 in forum Javascript Libraries
    Replies: 11
    Last Post: 4 May 2010, @ 11.45
  4. How Best To Display PDF files on my site
    By Ol'Canuck in forum Just Starting Out - Help Me!
    Replies: 13
    Last Post: 25 Feb 2010, @ 19.34
  5. Missing DDL Files...? Free DDL Downloads
    By Wrams in forum Computer Hardware & Software
    Replies: 0
    Last Post: 13 Sep 2009, @ 21.35

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •