Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jul 1998 15:06:37 -0700
From:      Jamie Lawrence <jal@ThirdAge.com>
To:        laszlo vagner <vagner@mutsgo.kf7nn.com>, questions@FreeBSD.ORG
Subject:   Re: off topic
Message-ID:  <3.0.5.32.19980716150637.01c47ce0@204.74.82.151>
In-Reply-To: <199807160456.XAA24071@mutsgo.kf7nn.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 11:56 PM 7/15/98 -0500, laszlo vagner wrote:
>if i run top and send it to a file like this
>top > file.txt  i can look at it perfectly 
>in a web browser but if i run it as a cgi
>script the output looks all bunched together
>like it is missing carriage returns.
>
>how can i format it so it displays in a cgi 
>script.

Return it as HTML. At the top:

Content-type: text/html

<html><head>top</head><body><pre>

your output here, then at the bottom: 


</pre></body></html>

Make very sure you follow the content-type line with
two newlines - that's part of the spec and a frequently
made mistake.

-j

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.19980716150637.01c47ce0>