note 27596 added to function.session-decode
| From: | mthornton at rack1 dot php dot net | Date: | Thu, 12 Dec 2002 15:37:41 +0000 |
| Subject: | note 27596 added to function.session-decode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40790@lists.php.net to get a copy of this message | ||
Session_decode() fails on every machine i've tried (both windows and linux). Seems to have a
memory problem.
But if it did work, this should also work to decode a session string:
function get_session_decode($sessStr)
{
if ($sessStr) {
session_decode($sessStr);
unset($sessStr);
$vars = get_defined_vars();
return $vars;
} //if
} //func
this should return an array of all the session variables. You may also want to do a
unset($vars['this']) if you are calling this in a class. Be sure to unset($vars[key]) any
variables you dont want returned.
Im pretty sure this would work, but since session_decode keeps crashin my scripts, i many never
know... :/
--
http://www.php.net/manual/en/function.session-decode.php
http://master.php.net/manage/user-notes.php?action=edit+27596
http://master.php.net/manage/user-notes.php?action=delete+27596
http://master.php.net/manage/user-notes.php?action=reject+27596