Warning: Cannot modify header information – headers already sent by

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.