但是IE8出現
Warning:
Cannot modify header information - headers already sent by
(output started at C:\xampp\htdocs\test\index.php:9)
in C:\xampp\htdocs\test\index.php on line 12
這解決方法有三種
1.COOKIE必須滿足條件再所有訊息未發出之前就必須設定
如:
<?php
$value = 'something from somewhere';
setcookie("TestCookie", $value);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ....
複製代碼
2.程式檔案最上面加上ob_start();及最下面加上ob_end_flush();
如:
<?php
ob_start();
// Initiate the output buffer
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">