Click to See Complete Forum and Search --> : text files
Count_Rugen
03-17-2003, 09:59 PM
i am building a site with a lot of text and was wondering if it is possible to save all the text in a text file and reference this in my HTML to print it to the screen instead of having all the text in the HTML file.
With PHP or SSI you can:
.php
<?PHP
include ("yourfile.txt");
?>
.shtml
<!--# include file="yourfile.txt"-->
The only thing to remember is that for your new lines in the text file, you will need <br>'s unless you are importing to a textarea...
jdavia
03-17-2003, 10:18 PM
Originally posted by Count_Rugen
i am building a site with a lot of text and was wondering if it is possible to save all the text in a text file and reference this in my HTML to print it to the screen instead of having all the text in the HTML file.
Do you mean something like a word that is hi-lited as a reference to more information?
If so use a link to another page that hav that information.
Other than that I can't make out what you are doing.
Count_Rugen
03-17-2003, 10:23 PM
excellent! Thanks! It works a treat.
Great...Out of curiosity, which method did you use? PHP or SSI?
Salam
03-18-2003, 03:42 AM
Hi, I needed to do something similar using
<?PHP
include ("yourfile.txt");
?>
problem is that it does not respect lines ... that is all the content is displayed on one line
Salam
Originally posted by pyro
The only thing to remember is that for your new lines in the text file, you will need <br>'s unless you are importing to a textarea...