Hello,
header();
... header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file.
<html>
<?php
/* This will give an error. Note the output
* above, which is before the header() call */
header('Location: http://www.example.com/');
?>
or
<?php
/* This will give an error. Note the output
* above, which is before the header() call */
header('Location: http://www.example.com/');
?>
or
<?php
/* This will give an error. Note the output
* above, which is before the header() call */
header('Location: http://www.example.com/');
?>
If you uploaded your php file with above codes you will get a warning:
Warning: Cannot modify header information - headers already sent by ...
Those are shown errors but what about hidden characters like  that been written using editors if you saved the file with character encoding utf-8.
only a none unicode compatible editor (cute html v2.6-2001) will show that marker at the start of the unicode file.
There is an edit program (Editpad lite - free from http://www.editpadpro.com/editpadlite.html) has an option to write that marker or not.
Click on Options > Configure file types > Encoding
I don't advice to remove that unicode mark unless you need to and it is necessary to add
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
between <head></head
Hope that was useful!, I found this trick, is it known to you ???
Regards,
M.Shair