计算时间的时间 [英] Time stuff calculating with time

查看:72
本文介绍了计算时间的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要这个小时间功能的帮​​助。三十分钟后,我想要回声......


[PHP]

$ _SESSION [''idlemin''] = date(i) ; //这会在每次刷新页面时更新会话,但在登录时定义。

$ minutes = date(i); //当前

if($ _SESSION [''idlemin'']> = $ minutes + 30){

echo你的时间到了!;

}

[/ PHP]


现在,我知道这显然不起作用......

假设您在14:49登录,它必须等于14:79才能正常工作,时间不能计算得那么高,所以我需要一些可以溢出数小时的东西..

I need help with this little time function. After thirty minutes, I want an echo to occur...

[PHP]
$_SESSION[''idlemin'']=date(i); //This makes the session update each time the page is refreshed but was defined on log in.
$minutes=date(i); //Current
if ($_SESSION[''idlemin'']>=$minutes+30) {
echo "Your time is up!";
}
[/PHP]

Now, I know this doesn''t work for obvious reasons...
Say you logged in at 14:49 well, it would have to equal 14:79 to work and well, time isn''t calculated that high so I need something that can spill over hours..

推荐答案

_SESSION [''idlemin''] = date(i); //这会在每次刷新页面时更新会话,但在登录时定义。
_SESSION[''idlemin'']=date(i); //This makes the session update each time the page is refreshed but was defined on log in.


minutes = date(i); //当前

if(
minutes=date(i); //Current
if (


_SESSION [''idlemin'']> =
_SESSION[''idlemin'']>=


这篇关于计算时间的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆