session过期监听

来源:互联网 发布:对象数组的指针 编辑:程序博客网 时间:2024/05/01 17:11


Sessions are cleaned up automatically by PHP when a session is started and there is currently no way to hook into this process unless you write your own custom session handler.

If you write your own handler, then PHP will call your gc method giving you control over the old session data that gets destroyed. Keep in mind that this happens at the start of the request (when session_start() is called) so you would want whatever processing you do to happen very quickly as not to delay the request being processed.


0 0
原创粉丝点击