| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Senior Member
Join Date: Feb 2003
Location: Canterbury
Posts: 115
|
Use text from a .txt file
Hi. A client has a news section that he keeps up to date in a text file. I have designed the html section of his site and he wants the news layer to display the text in the .txt file he has. This is so he only has to update on text file instead of 30-40 different html pages! Is there some simple javascript or something that I can use? |
|
|
|
|
|
#2 (permalink) |
|
i still want paying
Join Date: Oct 2003
Location: newcastle, uk
Posts: 4,728
|
I would use php Code:
should work if you put that where you want the news to be (obviously the file would have to be a php file not html (just change extension) |
|
|
|
#7 (permalink) |
|
I Ain't Losing Any Sleep™
Join Date: Apr 2003
Posts: 5,240
|
Yep your way is just as effective Bill but Gray's would offer the option (if needed) of writing, reading and deleting data from the text file. Useful when the job doesn't quite require the effort of setting up a db but maybe more user friendly than simply FTP. That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
|
|
|
|
#9 (permalink) | |
|
I Ain't Losing Any Sleep™
Join Date: Apr 2003
Posts: 5,240
|
Quote:
http://www.google.co.uk/search?hl=en...file+php&meta= Should explain quicker than I can. That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
|
|
|
|
|
#11 (permalink) | |
|
I Ain't Losing Any Sleep™
Join Date: Apr 2003
Posts: 5,240
|
Quote:
That's fuckin' ingenious, if I understand it correctly. It's a Swiss fuckin' watch.
|
|
|
![]() |