I found out that isset($_SESSION['hash'])
returns true even if the variable has expired(but does not let me use it). Is there any way to check if it has expired? Thank you!
答案 0 :(得分:0)
<?php
if (session_status() !== PHP_SESSION_ACTIVE) { session_start(); }
答案 1 :(得分:0)
I see what you are getting at now, you will need to keep track of the session time your self using another session the correct answer in this post explains it better than I can: Find out if a session with a particular id has expired