A cookie question, I hope the great God help me, thank you, say what is wrong?
PHP Code
Error:
Hello, you are the first time to login!
Warning:cannot Modify header Information-headers already sent by (output started at D:\LAMP\AppServ\www\cookie\lastVisi T.php:4) in D:\LAMP\AppServ\www\cookie\lastVisit.php on line 6
------Solution--------------------
So change the code ... In addition, if it is a UTF-8 encoded document, be careful not to have B
PHP Code
$first = False;if (Empty ($_cookie[' lastvisit ')) { $first = TRUE; Setcookie ("Lastvisit", Date (' y-m-d h:i:s '), time () + 30 * 24 * 3600);} else { $first = FALSE; Setcookie ("Lastvisit", Date (' y-m-d h:i:s '), time () + 30 * 24 * 3600);} if ($first) { echo "Hello, you are the first to log in!" ";} else { echo "Your last access Time is". $_cookie[' lastvisit ');}
------Solution--------------------