在PHP下面的代碼給出了警告。
<?php
if(!isset($_SESSION))
{
session_start(); // line 4
}
if(!isset($_SESSION['valid_admin']))
{
header("location:Login.php"); //line 9
}
?>
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\wamp\www\wagafashion\Order.php:8) in C:\wamp\www\wagafashion\Lock.php on line 4
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\wamp\www\wagafashion\Order.php:8) in C:\wamp\www\wagafashion\Lock.php on line 4
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\wagafashion\Order.php:8) in C:\wamp\www\wagafashion\Lock.php on line 9
我搜索了Google,發現一個問題here但我至今不明白什麼是有提及。我怎麼解決它?
[我的應用程序與上述代碼工作正常,但前幾天系統與藍屏錯誤墜毀,我不得不重新安裝它,我安裝了不同版本的WAMP。這是什麼問題?]
MOST詢問S.O的PHP問題請先搜索。 – 2012-07-12 00:32:46