Toon posts:

[PHP] Cookie foutmelding

Pagina: 1
Acties:

Verwijderd

Topicstarter
Ik heb in een webpagina een beveiligd gedeelte, als men ingelogd is, wil ik een cookie neerzetten, maar ik krijg steeds de volgende foutmelding:

Warning: Cannot add header information - headers already sent by (output started at /web/sites/113/doniek/www.doniek.f2s.com/Solver/testinlog.php3:8)

De php-code is de volgende:

<?
Setcookie("solver",$PHP_AUTH_USER,0);
?>

weet iemand wat er fout is, of wat het probleem is?
Alvast Bedankt.

  • D2k
  • Registratie: Januari 2001
  • Laatst online: 31-08 10:19

D2k

www.php.net/header

daar staat het

Doet iets met Cloud (MS/IBM)


Verwijderd

Topicstarter
Dat heeft toch niets met Cookies te maken?? Of bedoel je dat IE automatisch al een cookie neerzet als je een beveiliging via .htacces gebruikt?

  • D2k
  • Registratie: Januari 2001
  • Laatst online: 31-08 10:19

D2k

Op woensdag 26 september 2001 15:11 schreef doniek het volgende:
Dat heeft toch niets met Cookies te maken?? Of bedoel je dat IE automatisch al een cookie neerzet als je een beveiliging via .htacces gebruikt?
Remember that the header() function must be called before any actual output is sent, either by normal HTML tags blank lines in a file, or from PHP. It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that will output before header() is called. The same problem exists when using a single PHP/HTML file.

Doet iets met Cloud (MS/IBM)


Verwijderd

Topicstarter
Ik snap het, en het mooiste, het werkt nog ook *D Bedankt voor je reactie!