I get a warning error.
This is on a local machine using the Rapid PHP 2010 editor and server.
Code: Select all
$value = 'something from somewhere';
setcookie("TestCookie", $value);
setcookie("TestCookie", $value, time()+3600); /* expire in 1 hour */
setcookie("TestCookie", $value, time()+3600, "/~rasmus/", ".example.com", 1);
Warning: Cannot modify header information - headers alredy sent by (output started at C:\user\***\AppData\local\temp\prev0-.php:7) in {machine path} on line 4.
So why does their example fail to work?