[Catalyst] About output in a browser
Jason Kohles
email at jasonkohles.com
Wed Aug 29 18:45:11 GMT 2007
On Aug 28, 2007, at 6:52 PM, lanas wrote:
>
> Can someone tell me why the output of the directory listing is not the
> same due to, apparently, the poresence of a print statement ?
>
The print statement is being output before the document headers are.
Without the print statement, you are getting a content-type of text/
html, which causes everything to run together since the lines are
separated with newlines instead of <br> tags. When you add the print
statement, you are preventing the headers from being delivered
correctly to the browser, and either the web server or the browser is
deciding that since you didn't specify a content-type, it's going to
default to text/plain.
--
Jason Kohles
email at jasonkohles.com
http://www.jasonkohles.com/
"A witty saying proves nothing." -- Voltaire
More information about the Catalyst
mailing list