Date: 01/13/02
- Next message: Georg Richter: "Re: [PHP-DOC] cvs: phpdoc /en bookinfo.xml"
- Previous message: Philip Olson: "Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc"
- In reply to: Gabor Hojtsy: "Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc"
- Next in thread: Gabor Hojtsy: "Re: [PHP-DOC] RE: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc"
- Reply: Gabor Hojtsy: "Re: [PHP-DOC] RE: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> > Now mimicking $_SESSION functionality is another story, eww,
> maybe that's
> > going too far.
>
> This can be done by a register_shutdown_function() who registers
> all the vars in $_SESSION, using session_register. That's all :))
> If I can understand this new feature correctly (I never used it).
Using register_shutdown_function is unnecessary:
<?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.
-- Richard Heyes "If you have any trouble sounding condescending, find a Unix user to show you how it's done." - Scott Adams
- Next message: Georg Richter: "Re: [PHP-DOC] cvs: phpdoc /en bookinfo.xml"
- Previous message: Philip Olson: "Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc"
- In reply to: Gabor Hojtsy: "Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc"
- Next in thread: Gabor Hojtsy: "Re: [PHP-DOC] RE: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc"
- Reply: Gabor Hojtsy: "Re: [PHP-DOC] RE: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] superglobals and bc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

