Make the <?php the very first line in the file, otherwise the blank lines will be output prior to the php being executed. Once some content has been sent, then you are no longer able to send a header value.
Alternatively you can look at output buffering in the PHP manual if you want to send headers in your code after the content. |