Link to home
Start Free TrialLog in
Avatar of siamesefish
siamesefish

asked on

Help Needed: HTML & Text files

Dear All,

Im am currently doing a website for a friend.
Im not really very good at the programming aspects of things and so I have stumbled upon a little challenging bump in the road.

Due to the fact that my site needs one simple page that is updated regularly in terms of text information, and I haven't really learn't advanced stuff like ASP and such:

- Would anyone here know of how to make your html page read the text from a .txt file that would be stored together with all of the pages on the server. This way, all my friend needs to do is every now and then change the text in the text file and upload the new file after changes have been made.  Somehow like the html file that is linked to it grabs the text from this one .txt file and displays it. (it would only be a relation between one page and one .txt file)

Any help on this would be much appreciated.

Thank you : ) - Excitedly awaiting any help.

Regards
EJQ
ASKER CERTIFIED SOLUTION
Avatar of HairyMike
HairyMike

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Or if you have a Java-enabled server, it's as simple as this:

<pre>
<%@ include file="myfile.txt" %>
</pre>


An alternative solution would be to embed a frame into the page, which loads the txt file, such as:

<iframe src="myfile.txt"></iframe>

But this most probably is not what you're looking for ..
Avatar of Lee W, MVP
Very easy - server side includes.
Read the section here on Server Side Includes:
http://www.boutell.com/newfaq/creating/include.html
Avatar of siamesefish
siamesefish

ASKER

Thanks for all the comments! Im giving hairy mike the points cause he was the first.
but i appreciate all the rest very much. Thanks once again.

EJQ
Well, you should really accept the comment that helped the most (not the first to post).
Either way, you _can_ also split the points..

(A little too late now, but next time ......)