[TxMt] Re: Unwanted newline php

Rob McBroom mailinglist0 at skurfer.com
Fri Dec 11 16:35:50 UTC 2009


On Dec 11, 2009, at 2:41 AM, Ryan Fitzer wrote:

> Holy cow! I can't believe I missed that. Of course, I new to server
> side languages.

Just remember that PHP will treat everything outside of <?php ?> as part of a document and blindly output it.

This has bitten many people when they try to send a Content-type header and get errors because their script started with blank lines and/or comments, which causes most web servers to start sending it as “text/html” automatically.

-- 
Rob McBroom
<http://www.skurfer.com/>




More information about the textmate mailing list