note 105088 added to ref.session
| From: | SamYong-hellclanneratlivedotcom at osu1 dot php dot net | Date: | Wed, 27 Jul 2011 09:01:08 +0000 |
| Subject: | note 105088 added to ref.session | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181927@lists.php.net to get a copy of this message | ||
The following has been tested true in PHP 5.3.5.
Setting the session variables after the execution of the script i.e. in __destruct function, will
not work.
<?php
class Example{
function __destruct(){
$_SESSION['test'] = true;
session_write_close();
}
}
?>
The above example will write nothing into the temporary session file, as I observed through a custom
Session Save Handler.
----
Server IP: 69.147.83.197
Probable Submitter: 153.20.24.68
----
Manual Page -- http://www.php.net/manual/en/ref.session.php
Edit -- https://master.php.net/note/edit/105088
Del: integrated -- https://master.php.net/note/delete/105088/integrated
Del: useless -- https://master.php.net/note/delete/105088/useless
Del: bad code -- https://master.php.net/note/delete/105088/bad+code
Del: spam -- https://master.php.net/note/delete/105088/spam
Del: non-english -- https://master.php.net/note/delete/105088/non-english
Del: in docs -- https://master.php.net/note/delete/105088/in+docs
Del: other reasons-- https://master.php.net/note/delete/105088
Reject -- https://master.php.net/note/reject/105088
Search -- https://master.php.net/manage/user-notes.php