Possible Duplicate:
Headers already sent by PHP
I have a single php file, with this code in it:
<?php header("Location: somepage.php"); ?>
Absolutely no spaces before or after the php opening or closing tags and I am getting the
Warning: Cannot modify header information - headers already sent by (output started at C:\ ... \test.php:1
Usually when I get this error, the 1 is the line number of the problem, but in this case line one doesn't have any extra whitespace. I only have this code on the page and I am not including any other files.
I'm using xampp on windows xp. Any ideas what's going on or how I can track down what's really causing the problem.
Thanks
Chances are that you have what's known as a BOM (Byte Order Mark) in the file. Depending on what editor you're using, you'll need to turn off adding the BOM...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With