how to get the Session time in php

Asked

Viewed 269 times

1

someone knows how to get the time remaining for section to expire?

I’m raising her like this:

session_start();

Wanted to display to the user the time he has remaining

  • will have to store the clock at the time of creation, and deduct from the total.

1 answer

2


Try using the following excerpt:

$segundos=ini_get('session.gc_maxlifetime');
  • OK vlw, thank you very much

  • this gives the maximum, not the current session expiration time.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.