Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\bookstore\checklogin.php:10) in C:\AppServ\www\bookstore\checklogin.php on line 11
Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\bookstore\checklogin.php:10) in C:\AppServ\www\bookstore\checklogin.php on line 12
Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\bookstore\logout.php:2) in C:\AppServ\www\bookstore\logout.php on line 10
Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\bookstore\logout.php:2) in C:\AppServ\www\bookstore\logout.php on line 11
Code (PHP)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?
ob_start();
@session_start();
if (isset($_SESSION["username"])){
session_destroy();
include("login.php");
}else if (isset($_COOKIE["username"])){
setcookie("username", "", time()-3600);
setcookie("password", "", time()-3600);
include("login.php");
}
?>
ผลลัพธ์แสดงข้อผิดพลาดตอน login เข้าหน้า wp-admin ครับ:
Warning: Cannot modify header information - headers already sent by (output started at /home/domains/xxx.com/public_html/wp-includes/formatting.php:1) in /home/domains/xxx.com/public_html/wp-includes/pluggable.php on line 866