Hola:
Tengo la siguiente parte de un script correspondiente a un contador de visitas:
if ($ccontador == "") { // Si no tenemos el cookie..
$ip = getenv("REMOTE_ADDR");
setcookie("ccontador", $ip, time() + 1800, "/", ""); // Lo activamos
$visitas[0]++; // Incrementamos el contador de visitas TOTALES
$visitas[1]++; // Y el de visitas HOY
}
y me da error en setcookie("ccontador", $ip, time() + 1800, "/", ""); desconociendo el porque.
El error que me da es el siguiente:
Warning: Cannot modify header information - headers already sent by (output started at /home/ywazthhd/public_html/ver_demandas.php:5) in /home/ywazthhd/public_html/contador.php on line 21
Por favor, os agradeceré vuestra ayuda.