[thelist] Tip: whitespace in included PHP causes header() calls to fail

Kasimir K evolt at kasimir-k.fi
Fri Aug 19 04:27:40 CDT 2005


> Ian Anderson wrote:
>>Turned out there was a space *after* the closing "?> " in the included
>>file, which was getting written to the browser as unintentional output
>>at the start of the HTML. 

Matt Warden scribeva in 2005-08-19 00:37:
> This is why you should never use the closing ?> in include files (it's
> optional).

I'm getting confused here... Earlier this year I asked about omitting 
the closing "?>" and then I was discouraged from doing that. [0]

Now reading this I again had a look at the manual and a quick google, 
and it seems that in the old versions of the manual it indeed says that 
"?>" is optional, but current version says nothing about omitting it.

So if I start leaving out those, will my PHP scripts still work fine 2010?

cheers,
.k

[0] http://lists.evolt.org/archive/Week-of-Mon-20050207/169110.html


More information about the thelist mailing list