read()) { if (substr($filename, 0, 5) == 'sess_') { $sess_data = ''; if (is_readable("$path/$filename")) { $sess_data = file_get_contents("$path/$filename"); } if (!empty($sess_data)) { session_decode($sess_data); $sess_data = $_SESSION; $_SESSION = array(); $sess_name = substr($filename, 5); $sess_name = htmlentities($sess_name, ENT_QUOTES, 'UTF-8'); echo "

Session [$sess_name]

"; foreach ($sess_data as $name => $value) { if (is_string($value)) { $name = htmlentities($name, ENT_QUOTES, 'UTF-8'); $value = htmlentities($value, ENT_QUOTES, 'UTF-8'); echo "

$name:

"; } } echo '
'; } } } $handle->close(); ?>