Benim ücretsiz host döndü bu hataları alıyorum, benim başlıkları nerede anlatmak için nasıl emin değilim?

0 Cevap php

I'm getting errors like this Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /www/zymichost.com/m/i/t/mitchell931993/htdocs/connected/index.php:5) in /www/zymichost.com/m/i/t/mitchell931993/htdocs/connected/index.php on line 5

Uyarı: session_start () [function.session-start]: session cache limiter gönderilemiyor - başlıklar zaten gönderildi (çıkış / www/zymichost.com/m/i/t/mitchell931993/htdocs/connected/index.php başladı: 5 ) 5. satırdaki / www/zymichost.com/m/i/t/mitchell931993/htdocs/connected/index.php içinde

Ben bunları düzeltmek için nasıl emin değilim. Benim web sitesi atm Test aşamalarında bir teşebbüs sosyal ağ sitesi, onun olduğunu. Benim koduyla ne yanlış Anlatabilirsin?

Header.php

<?php 
if(isset($_SESSION['login'])){
$szUser=$_SESSION['login'];
echo "<table width=\"980\" border=\"0\" align=\"center\">
<tr>
<td width=\"490\" align=\"left\">Connected - Welcome $szUser</td>
<td width=\"490\" align=\"right\"><a href=\"home.php\">Log Out</a></td>
</tr>
</table><hr width=980 align=\"center\">";
}
elseif(!isset($_SESSION['login'])){
echo "<table width=\"\" border=\"0\" align=\"center\">
<tr>
<td width=\"490\" align=\"left\"> Connected - You are not logged in...</td>
<td width=\"490\" align=\"right\"><a href=\"login.php\">Please login here</a></td>
</tr>
</table><hr width=980 align=\"center\">";
}
?>

Ve bu kullandığı indeks sayfası

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php session_start();?>
<title>Connected - Home</title>
</head>
<body>
<div align=center>
<?php
include_once "resources/header.php";
echo "<table><tr><td width=980 height=500 align=center valign=middle>";
include_once "resources/login.html";
echo "</td></tr></table>";
?>
</div>
</body>
</html>

0 Cevap