Finding total number of active sessions

前端 未结 5 1025
孤独总比滥情好
孤独总比滥情好 2020-12-18 10:28

I\'m a beginner to PHP and I\'m writing some code to my site. I want to get the total number of sessions that is active at that instant. I knew this is some difficult task b

5条回答
  •  醉话见心
    2020-12-18 11:14

    This will count the amount of sessions open at once.

    $number_of_users = count(scandir(ini_get("session.save_path")));
    

提交回复
热议问题