in reply to Printing a log file in a CGI script
in thread Reading data from a document.txt
If you're printing out the lines, but they aren't printing as you would like, your problem is probably that you're printing plain text but your browser is expecting HTML. This suggests two solutions:
It's probably easier to accomplish 1 than 2: just change the string "Content-type: text/html\n\n" to "Content-type: text-plain\n\n" and you should get a readable, if boring, output. If you want to output HTML, you should look at using CGI.pm, which makes it fairly easy to do such things.
And yes, please do read the links proposed above by cjf--they will make your life easier and get you better answers faster.
|
|---|