|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-06-14 13:48 UTC] sniper@php.net
[2001-06-14 15:20 UTC] alex at gai dot ru
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 08:00:01 2025 UTC |
===cut=== <?php function open ($save_path, $session_name) { $f = fopen('log', 'a'); fputs($f, "open ($save_path, $session_name)\n"); fclose($f); return true; } function close() { $f = fopen('log', 'a'); fputs($f, "close\n"); fclose($f); return true; } function read ($key) { $f = fopen('log', 'a'); fputs($f, "read ($key)\n"); fclose($f); return "foo|i:1;"; } function write ($key, $val) { $f = fopen('log', 'a'); fputs($f, "write ($key, $val)\n"); fclose($f); return true; } function destroy ($key) { $f = fopen('log', 'a'); fputs($f, "destroy($key)\n"); fclose($f); return true; } function gc ($maxlifetime) { return true; } session_set_save_handler ("open", "close", "read", "write", "destroy", "gc"); session_start(); $foo++; ?> ===cut=== -this will produce one "log" in the document-root directory and another in the root dir.