Possible Duplicate:
PHP closing tag
Why pure php source
files are suggested not
to end with ?>
?
Today I found a problem that was caused by the ?>
, which make the code print a extra char(maybe space
, I am not sure)
Possible Duplicate:
PHP closing tag
Why pure php source
files are suggested not
to end with ?>
?
Today I found a problem that was caused by the ?>
, which make the code print a extra char(maybe space
, I am not sure)
If you include the ?>
at the end of the file there is a possibility that you might accidentally have a newline character afterwards. Many editors automatically add a new line at the end of the file, so it is easy for this to accidentally happen. The new line character will be sent to the client and this can give problems. In particular, the headers cannot be modified once content has been sent to the client.