Le mardi 04 mars 2003 à 18:30:28, Didier MISSON a écrit: > J'essaye PHP. > > J'ai trouvé qques sites bien fait avec des explications et exemple. > > J'essaye les cookies. > > http://www.az-php.com/?p=cours_6 > http://www.phpfreaks.com/phpref/32.php > > > ça parait simple... > Mais ça ne marche pas :o) > > <HTML> > <?php > setcookie('lastvisit',time(),time()+24*3600*5); > ?> > </BODY> > </HTML> > > me donne le msg d'erreur : > > Warning: Cannot add header information - headers already sent by > (output started at /usr/local/httpd/htdocs/mrtg/test2.php:2) in > /usr/local/httpd/htdocs/mrtg/test2.php on line 3
Bonsoir, La fonction setcookie doit être appelée avant tout envoi de données au navigateur. Pour que ça marche il la mettre avant la balise <HTML> Salutations. -- Bruno Berteau _______________________________________________________ Linux Mailing List - http://www.unixtech.be Subscribe/Unsubscribe: http://www.unixtech.be/mailman/listinfo/linux Archives: http://www.mail-archive.com/[EMAIL PROTECTED] IRC: efnet.unixtech.be:6667 - #unixtech