Voting

: max(seven, nine)?
(Example: nine)

The Note You're Voting On

vesely at tana dot it
20 years ago
When using this function to manage sessions, it is MUCH
better to have register_globals turned off. Then one can
examine the session content given its id.

<?php
$fname
= session_save_path() . "/sess_" . $the_sid;
if (
session_decode(file_get_contents($fname)))
{
$vars = $_SESSION;
$_SESSION = array();

// examine $vars...
}
?>

Depending on PHP version, you may need to have a dummy
session started for the code above to work. I reset the
$_SESSION immediately in order to avoid writing the
dummy session: that's needed while testing the code!

<< Back to user notes page

To Top