17/04/2012, 02:37
|
| | Fecha de Ingreso: febrero-2012
Mensajes: 19
Antigüedad: 12 años, 9 meses Puntos: 0 | |
Problema con Session php Hola, os adjunto mi sencillo script -->
<?php
ob_start();
session_start();
$_SESSION['usuario']='nicolas';
header('Location: ./main.php/');
ob_flush();
?>
main.php -->
<?php
ob_start();
session_start();
if(isset($_SESSION['usuario'])){
echo $_SESSION['usuario'] ;
}else{
echo "hola";
}
ob_end_flush();
?>
Me pone este error -->
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\AppServ\www\unamed\index.php:1) in C:\AppServ\www\unamed\index.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\unamed\index.php:1) in C:\AppServ\www\unamed\index.php on line 3
Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\unamed\index.php:1) in C:\AppServ\www\unamed\index.php on line 6
He mirado muchisimos posts, pero no he dado con la sulcion... alguna ayuda porfavor?
Gracias ! |