note 72057 added to function.session-set-cookie-params

From: Date: Sun, 31 Dec 2006 07:31:16 +0000
Subject: note 72057 added to function.session-set-cookie-params
Groups: php.notes 
Request: Send a blank email to php-notes+get-121127@lists.php.net to get a copy of this message
There is something that the php manual does not explain very well, the lifetime of the cookie is not the sum of time() + whatever you want. It should be whatever you want: CORRECT: $life = 60 * 60 * 24 * 30; // 30 days WRONG: $life = time() + (60 * 60 * 24 * 30); ---- Server IP: 64.71.164.2 Probable Submitter: 72.198.8.30 ---- Manual Page -- http://www.php.net/manual/en/function.session-set-cookie-params.php Edit -- https://master.php.net/note/edit/72057 Del: integrated -- https://master.php.net/note/delete/72057/integrated Del: useless -- https://master.php.net/note/delete/72057/useless Del: bad code -- https://master.php.net/note/delete/72057/bad+code Del: spam -- https://master.php.net/note/delete/72057/spam Del: non-english -- https://master.php.net/note/delete/72057/non-english Del: in docs -- https://master.php.net/note/delete/72057/in+docs Del: other reasons-- https://master.php.net/note/delete/72057 Reject -- https://master.php.net/note/reject/72057 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#121127) next »