note 8998 deleted from ref.session by yohgaki
| From: | yohgaki@php.net | Date: | Sat, 19 Jan 2002 06:24:44 +0000 |
| Subject: | note 8998 deleted from ref.session by yohgaki | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25093@lists.php.net to get a copy of this message | ||
With Options track_vars = 1 and register_globals = 0, $HTTP_STATE_VARS['x'] can be used to
read, but not write session variable $x. What's stored in the session seems to be the global
$x.
So one must do one of
1)//start session
session_register('x');
$x = $HTTP_STATE_VARS['x'];
//main script reads/writes global var $x
...
//end session: nothing to do
or
2)//start session
session_register('x');
//main script reads/writes $HTTP_STATE_VARS['x']
...
//end session: write value back to global
$x = $HTTP_STATE_VARS['x']
(I'm speaking of mod_php 4.0b4pl1.)