|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-02-27 13:19 UTC] aharvey@php.net
[2013-07-13 13:19 UTC] ali dot zahedi1371 at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 12:00:01 2025 UTC |
Description: ------------ <html> <head> <title>cookie</title> </head> <body> <?php setcookie('test',45,time()+(60*60*24*7)); ?> </body> </html> my firefox , ie8 and chrome displays Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\php_sandbox\cookies.php:7) in C:\wamp\www\php_sandbox\cookies.php on line 8 please help......... Reproduce code: --------------- --- From manual page: http://www.php.net/function.setcookie --- <html> <head> <title>cookie</title> </head> <body> <?php setcookie('test',45,time()+(60*60*24*7)); ?> </body> </html> Actual result: -------------- warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\php_sandbox\cookies.php:7) in C:\wamp\www\php_sandbox\cookies.php on line 8