html generally ignores white space, so if you want it displayed in a particular layout then you need to add some markup.
Try wrapping your text in a pre tag i.e. <pre>your text here</pre>
BTW the browser knows how to display different file types, but if your app tells the browser it's sending html and then just sends plain text, it's not surprising that you don't get the results you expected.
In reply to Re^4: How to convert a text file to a HTML file
by RichardK
in thread How to convert a text file to a HTML file
by ghosh123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |