Jan 6, 1999, 6:16 AM
Veteran / Moderator (8669 posts)
Jan 6, 1999, 6:16 AM
Post #3 of 3
Views: 2116
Another way to do it, although a little more complicated than Jaime's method, will allow you to have your text formatted in a nice page.
This is what I did. First I defined the full path (not URL!) to the directory where my text files are, called $text_file_path. Then I put a field in my db for the name of the text file associated with the record. (I didn't put the ".txt" extension in the database.) The following is the code that inserts the text file into the page:
if (open (FILE, qq|$text_file_path$rec{'file'}.txt|)) {
print <FILE>;
close FILE;
}
else { print "Can't find it"; }
You can put html formatting tags into your text file so it will look the way you want it to.
I hope this helps.
------------------
JPD
[This message has been edited by JPDeni (edited January 06, 1999).]