PDA

View Full Version : Long Text File Handling


jscott1
06-19-2003, 12:26 AM
I am working on creating a dynamic website. In order to keep my database small and agile, I have decided to write the "story" content to a text file and only save the file name in the database.

My probelm is that I didn't anticipate how long some of these text files are, and I don't like all the scrolling down the page to read it.

Anyone have a suggestion on a tutorial or pointers on how to best handle setting up a way to display the file over a couple of pages with navigation from page to page? I was thinking of just using a loop and Readline to just set a default number of text lines I am going to allow, and then coding a way to navigate to the "Next Page" and continue the story.

My second issue is retaining the formatting when the text is read back into my web page. Is there a better way to maintain the space between paragraphs other than mixing some html into the text?

Any pointers would be appreciated.