Debugging PHP Output -
i have php website on pages adding dot or space before first html tag. can't figure out coming - there way debug code can see coming from? thanks, josh
to prevents happening considered practice don't end php file ?>
.
you possibly have file way (notice space after ?>
):
<?php // code // ?>
if remove ?>
@ end, space @ end of file won't interpreted output.
for files contain php code, closing tag ("?>") never permitted. not required php, , omitting it´ prevents accidental injection of trailing white space response.
source: http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html
Comments
Post a Comment