...

View Full Version : Updating content using flat text files



steve55
01-27-2004, 01:21 PM
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

sweenster
01-27-2004, 01:31 PM
very easy:



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

steve55
01-27-2004, 04:55 PM
I know how to include the files, but am unsure how to add/edit/delete entries from the file.....can anyone assist me..?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum