How to avoid Warning: “Headers already sent” or “Cannot modify header information”
From time to time you may want to refresh the page or redirect the page with php this is very easy to do using the php header command, To use a header it has to be used before any output has started on the page.
In other words it has to come before anything is printed including the docytype. This is less than ideal in most situations and if you do use a header after output has already started you will get a warning saying “Headers already sent” or “Cannot modify header information”.
Thankfully there is an easy way to avoid it … Continue Reading
