On Saturday 15 November 2003 08:22 pm, Chris Shiflett wrote:
> 1. When a closing PHP tag, such as ?>, is followed by a newline, the
> newline is not output.
Im the original author to this thread, and this is an attempt to bring back
this thread to square one, as it was straying in other directions that
doesn't apply to me.
Command Line editors used.
ee, vi, vim, joe
X GUI editors used
Quanta, Gvim
Currently all these editors add what appears to be a \n after a closing ?>
This I believe is normal, because all *nix files contain a \n at the end of
lines.
I had a theory that output buffering was "cleaning" up my code, but this isn't
the case, as I've turned off output buffering and Im still getting the same
results.
Speaking of results. Im not getting the infamous "headers sent" error.
My scripts operate normally.
The reason why I started this topic was to get some ammunition to ward off
windows GUI editor users who claim that my code contains "white space" after
the closing ?> tag.
Some dummy code ->
x.php
<?php
?>
y.php
<?php
include('./x.php');
var_dump(headers_sent());
?>
y.php returns false, even though, there is apparently a \n after the
closing ?> tag of x.php
You may download my dummy code and view them in a windows GUI php editor, and
see the extra line after the closing ?>
http://www.trini0.org/white_space.zip
So going back to my original question ->
So is "white space" only physical space (\s) or can it be anything like
\t \r \n???
.Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php