ERROR-PHP hint "headers already sent by" what's going on?

Source: Internet
Author: User
Error message:
Sae_warning:cannot Modify header Information-headers already sent by (output started at/data1/www/htdocs/345/leank/1/b BS/LOGIN.PHP:15) in bbs/login.php on line 9

Sae_warning:cannot Modify header Information-headers already sent by (output started at/data1/www/htdocs/345/leank/1/b BS/LOGIN.PHP:15) in bbs/login.php on line 10

Sae_warning:cannot Modify header Information-headers already sent by (output started at/data1/www/htdocs/345/leank/1/b BS/LOGIN.PHP:15) in bbs/login.php on line 28

Sae_warning:cannot Modify header Information-headers already sent by (output started at/data1/www/htdocs/345/leank/1/b BS/LOGIN.PHP:15) in bbs/login.php on line 29

Approximate code:

   
 ";                } else {echo "Login failed!";            echo "Please check that your user name or password is filled in correctly";            }} else {echo "Login failed!";        echo "Please check if your user name or password is empty"; }}?>

The error is roughly this location:
Setcookie (' username ', ' $username ', Time () +31536000, '/');
Setcookie (' Logset ', ' OK ', Time () +31536000, '/');

Reply content:

Error message:
Sae_warning:cannot Modify header Information-headers already sent by (output started at/data1/www/htdocs/345/leank/1/b BS/LOGIN.PHP:15) in bbs/login.php on line 9

Sae_warning:cannot Modify header Information-headers already sent by (output started at/data1/www/htdocs/345/leank/1/b BS/LOGIN.PHP:15) in bbs/login.php on line 10

Sae_warning:cannot Modify header Information-headers already sent by (output started at/data1/www/htdocs/345/leank/1/b BS/LOGIN.PHP:15) in bbs/login.php on line 28

Sae_warning:cannot Modify header Information-headers already sent by (output started at/data1/www/htdocs/345/leank/1/b BS/LOGIN.PHP:15) in bbs/login.php on line 29

Approximate code:

   
 ";                } else {echo "Login failed!";            echo "Please check that your user name or password is filled in correctly";            }} else {echo "Login failed!";        echo "Please check if your user name or password is empty"; }}?>

The error is roughly this location:
Setcookie (' username ', ' $username ', Time () +31536000, '/');
Setcookie (' Logset ', ' OK ', Time () +31536000, '/');

Because in the Setcookie before the output of something caused, see the code seems to be the output of space, the middle of the

?>  
 
  

get rid of it.

Dear. Remember to save the file to UTF-8 without BOM format every time you finish writing the program. Otherwise it would be easier to say the wrong thing.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.