mam nastepujące pytanie . ponizszy kod :
[php:1:0c4c089270]<?
session_start();
$_SESSION['costam'] = "cos";
if(isset($_SESSION['costam']))
{
$sid = session_id();
echo "<html>";
echo "<head><title>php Session Is Set!</title></head>";
echo "<body><p>The session is set! The PHPSESSID is: $sid</p></body>";
echo "</html>";
}
else
{
echo "<html>";
echo "<head><title>php Session Is NOT Set!</title></head>";
echo "<body><p>The session is NOT set! Check your server configuration or version.</p></body>";
echo "</html>";
}
?>[/php:1:0c4c089270]
daje mi w wyniku następujący komunikat :
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:usrwwwsesja1.php:8) in C:usrwwwsesja1.php on line 10
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:usrwwwsesja1.php:8) in C:usrwwwsesja1.php on line 10
The session is set! The PHPSESSID is: 4b2da9df561e1d1a446e3a58002ef986
(chodzi o linie gdzie jest session_start, w powyzszym kodzie 2ga)
natomiast po wykasowaniu wiersza:
session_start();
nie ma warningów za to id sesji nie jest podawane.
czy moze ktos mi wytlumaczyc o co z tym chodzi ?