Home » questions » About: Warning: Cannot modify header information - headers already sent by (output started at...?

About: Warning: Cannot modify header information - headers already sent by (output started at...?

2006-08-07 11:17:03, Category: Programming & Design
I received message:Warning: Cannot modify header information - headers already sent by (output started at......) when i run my website.I have checked space before and after ...But i received above massage.I remove all of code and wrote : But it still dont run and i still received above message. Can you help me? Thanks

Answers

  1. Bryan A

    On 2006-08-07 11:23:32


    Make sure that the location is Location (I don't know if it is picky about that) and that everything in the parenthesis is in quotes, like: header("Location: http://www.yahoo.com"); So the whole page should be: And nothing else. There shouldn't be anything else before the header.
  2. DX

    On 2006-08-07 11:22:33


    header("Location:login.php"); exit();
  3. pmp

    On 2006-08-07 12:55:37


    You can also try output buffering:
  4. John J

    On 2006-08-07 11:35:37


    first, there can be nothing returned before your PHP block (white space included). Second the correct way to call that is - header("Location: {website}"); (note the capitalized Location).