Header got an error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yuthear
    New Member
    • Oct 2008
    • 2

    Header got an error

    Dear everyone,

    I haven't had experienced with php. Therefore, when I use header() I often get an error.

    So, Is there anyone knows this problem?

    I am looking forward to hearing from you soon.

    Best,

    Yuthear
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    what error messages do you get?

    Comment

    • v08i
      New Member
      • Nov 2008
      • 2

      #3
      are you getting this error:

      Cannot modify header information - headers already sent by ().......

      If it is so. then make sure that you do not have any white spaces, any echo/print statement before that. In short, no output must be sent to browser before header statement. header must be the first line in your php file afte your <?php opening tag.

      thanks
      Last edited by pbmods; Nov 20 '08, 12:40 AM. Reason: Fixed link.

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        you get this error also if an error message/exception is output/thrown before your document starts.

        Comment

        Working...