Witam
Mam o to taki błąd
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /homepages/16/d339296823/htdocs/epicshot/addshot.php:1) in /homepages/16/d339296823/htdocs/epicshot/auth_user.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /homepages/16/d339296823/htdocs/epicshot/addshot.php:1) in /homepages/16/d339296823/htdocs/epicshot/auth_user.php on line 3
Nie moge przekierowac. Wyslano juz naglowki.
Probowałem już rożnych metod ale dalej nie działa, dałem tez ob_start() bo myślałem ze pomoże, ale nic z tego. Co jest nie tak?
o to kod auth_user.php
<?php
require_once "header.php";
if
((isset($_SESSION['user_logged']) && $_SESSION['user_logged'] != "") ||
(isset($_SESSION['user_id']) && $_SESSION['user_id'] != "") ||
(isset($_SESSION['user_password']) && $_SESSION['user_password'] != "")) {
} else {
redirect('index.php');
}
kod addshot.php
<?php
require_once "auth_user.php";
require_once "function_engine.php";
require_once "function_graph.php";
header_blok();
filled();?>
<table border="0" width="631" cellspacing="1" cellpadding="3" bgcolor="#353535" >
<tr>
<td border="0" bgcolor="#FF6633" width="100%" height="50" align="center">
W tym miejscu możesz wrzucić swojego shot'a. <br>Przyjmowane są obrazy w formatach: GIF, JPG/JPEG i PNG.<br>
Maksymalny rozmiar pliku to 1MB,
szerokosc :800 pikseli,
wysokosc: 600 pikseli
</b></center>
</td>
</tr>
</table><br>
<form name="image_add" method="post" action="transact_shot.php?action=add" enctype="multipart/form-data">
<table border="0" width="631" cellspacing="1" cellpadding="3" bgcolor="#259CF7" ><tr>
<td border="0" bgcolor="" width="100%" align="LEFT"> UMIESZCZANY OBRAZ</td></tr></table><br>
<input name="image_filename" type="file" size="29"> <br><br>
<table border="0" width="631" cellspacing="1" cellpadding="3" bgcolor="#259CF7" ><tr>
</select>
<input type="submit" name="Submit" value="Wyślij">
</form><BR><BR>
<?php
header.php
<?php
function redirect($url) {
header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/' . $url); } else {
die('Nie moge przekierowac. Wyslano juz naglowki.'); }
}