Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Display text file content
Message
From
20/07/2006 08:39:43
 
 
To
19/07/2006 21:24:06
General information
Forum:
Internet
Category:
Active Server Page
Miscellaneous
Thread ID:
01137474
Message ID:
01137991
Views:
9
>Hi,
>
>Thank for your help. Suppose my text file contain like this:
>
>Hello....
>Good morming.
>
>
>So when the html page read the text file....how does it know have to go to the next line? Instead of displaying Hello....Good morning.
>
>Thanks.
>
>regards
>Kusnardi


Hello Kusnardi,

By default, as Naomi points out, the carriage returns and line breaks in your text file will be ignored as the contents of the test file are placed into the HTML stream.

You have two options. One is to parse the text file as you read it, and insert the appropriate
< P > and < BR >
tags, as Naomi suggests. This can be a little complicated if the file is exceptionlly large, or contains a lot of formatting.

The second thing you can do is use the
< PRE > < /PRE >
HTML tags. Essentially, any text that gets inserted between these two tags is rendered as is, including all carriage returns and line breaks, when placed in the HTML stream. The quick way to accomplish what you are trying to do is to dump the contents of the text file between these tags when writing to the browser.
Phil
_____________________________
Phil Miles
http://www.philmiles.com
phil@philmiles.com
Previous
Reply
Map
View

Click here to load this message in the networking platform