RE: [PHP-DOC] RE: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc

From: Date: Sun, 13 Jan 2002 21:40:39 +0000
Subject: RE: [PHP-DOC] RE: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-76922@lists.php.net to get a copy of this message
> > <?php > > > > session_start(); > > if(ini_get('register_globals') AND !isset($session_global_var)){ > > $session_global_var = array(); > > } > > > > session_register('session_global_var'); > > > > if(ini_get('register_globals')){ > > $SESSION =& $session_global_var; > > }else{ > > $SESSION =& $HTTP_SESSION_VARS['session_global_var']; > > } > > > > ?> > > > > Use the above code and you will be able to add/remove anything from the > > $SESSION array and it will be reflected in the next request. > > OK, but this is a way of intorducing another thing: $SESSION, instead > of making $_SESSION work like in 4.1.0 in older versions... Using > register_shutdown_function, you can make this feature transparently > working. Thats what this does, ie add something to $SESSION and it's registered, remove it and it's unregistered. No need for register_shutdown_function(). -- Richard Heyes "If you have any trouble sounding condescending, find a Unix user to show you how it's done." - Scott Adams

« previous php.dev (#76922) next »