Lascia perdere la pagina top_foot_index.inc.php, non c'entra nulla, il problema è generico (magari anche quella pagina contribuisce, ma una volta capito il problema la soluzione è evidente).
Il problema è, da manuale:
codice:
setcookie() defines a cookie to be sent along with the rest of the HTTP headers. Like other headers, cookies must be sent before any output from your script (this is a protocol restriction). This requires that you place calls to this function prior to any output, including <html> and <head> tags as well as any whitespace. If output exists prior to calling this function, setcookie() will fail and return FALSE. If setcookie() successfully runs, it will return TRUE. This does not indicate whether the user accepted the cookie.
Dato che la funzione top fa un echo, cadi nella condizione in grassetto...ovvero fai un echo e poi tenti di settare un cookie...e non si può fare