The page has no action. after five minutes, the system automatically exits. I want the user to log on to the system. if there is no action within five minutes, the system automatically exits. How can we solve this problem? How can I determine whether the page has no action ;? ------ Solution ------------------ make a checklogin. php page. the inclde page does not have any action on the page to determine whether to time out. the page will automatically exit the system in 5 minutes.
I want the user logging on to the system to automatically exit the system if there is no action within five minutes. How can we solve this problem?
How can I determine whether a page has no action?
------ Solution --------------------
Make a checklogin. php page
Inclde page in the page to determine whether the timeout exists
Session_start ();
Header ("content-type: text/html; charset = utf-8 ");
// Timeout Time. unit: Seconds. set this parameter to 10 minutes.
$ Timeout = 600;
$ Now = time ();
If ($ now-$ _ SESSION ['session _ time'])> $ timeout)
{
// Timeout.
Unset ($ _ SESSION ['clientid']);
}
Else
{
// No timeout.
$ _ SESSION ['session _ time'] = time ();
}
If (empty ($ _ SESSION ["clientID"])
{
Echo"