Most of the time we donot actually care about leaving the blanks spaces before and after the “php” tag which results on “Warning: Cannot modify header information – headers already sent by (output started at /path/blog/somefile.php:4)“” .
The above problem could be solved by removing the blank spaces before “<?php” tag and after “?>” tag. and make sure the last characters are ?>, placed at the last line with no space in between.