Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    -
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Help with updating content using flat text files

    Hi,

    I would like to 'include' some text on a web page that is contained in a seperate .txt or .dat file.

    I would also like a page that would enable me to update the file(s) just by retyping the content, saving the file, which would automatically update the content on the web page.

    Considerations are:- I would like to use 'flat text files' , there is other content on the web page, and the update page should display the text just 'as it is' - I don't want to have to include html tags..

    Just wondering if anyone has a solution/can point me in the right direction.

    Many Thanks,
    Steve
    Last edited by steve55; 01-28-2004 at 09:04 PM.

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Scotland
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts
    very easy:

    PHP Code:
    <p>
    <? include('file.txt'); ?>
    </p>
    as for a page to update your textfile - it won't be that tricky. I know it involves fopen() command but i've never used it before.
    My body's a temple... and like those ancient Greek ones it's a ruin
    sweenster.co.uk

  • #3
    New Coder
    Join Date
    Aug 2002
    Location
    -
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I know how to include the files, but am unsure how to add/edit/delete entries from the file.....can anyone assist me..?
    Last edited by steve55; 01-28-2004 at 09:01 PM.


  •  

    Posting Permissions

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