dongshi4589
dongshi4589
2012-05-16 13:26

检查用户何时离开PHP页面

  • php

Ok, I read this post and someone suggest using this code to check if user left page:

    if($_SERVER['REQUEST_URI'] !== 'page_with_session.php'){
    session_destroy(); // Kill session for all pages but page_with_session.php
}

Now can someone please explain how REQUEST_URI works cause I can't seem to find it in the PHP manual, or can someone suggest another way to check when a user has left a page.

Please note I can't use Javascript for this project.

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答

为你推荐