我不斷收到警告當我嘗試和負荷我的網頁...掌握Facebook的PHP API「已經發送了頭」
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/blazecra/public_html/matt/header.php:23) in /home/blazecra/public_html/matt/facebook/facebook.php on line 37
這裏是我的header.php文件
<?php
echo '<html>
<head>
<title>MyGag - The Home of Gagging!</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<img src="img/nav.png" height="50" width="1000">
<div id="logo">
<a href="index.php"><img src="img/logo.png" height="50" width="150"></a>
</div>
';
?>
而且在facebook的第37行php只是有
session_start();
任何想法爲什麼會發生這種情況?
好,所以它的話說,有輸出在這個header.php某處我知道im回聲ing,但那只是html。
如果你明白我的話,我不會返回任何東西嗎?
[接頭已經由PHP發送]的可能重複(http://stackoverflow.com/questions/8028957/headers-already-sent-by-php) – mario 2012-02-12 21:22:07
任何輸出,其包括的HTML。 – 2012-02-12 21:29:01