21,887
社区成员
发帖
与我相关
我的任务
分享
strtotime(date("Y-m-d")); //00:00
strtotime(date("Y-m-d 02:00")); //02:00
strtotime(date("Y-m-d 22:00")); //22:00
strtotime(date("Y-m-d 24:00")); //24:00
//提示时间检查
$fromTime=strtotime(date('Y-m-d ',$this->time).$this->settings['cashFromTime'].':00');
$toTime=strtotime(date('Y-m-d ',$this->time).$this->settings['cashToTime'].':00');
if($this->time < $fromTime ||$this->time > $toTime ) throw new Exception("对不起,已过提现时间,请在合适的时间提交!<br />提现时间:".$this->settings['cashFromTime']." ~ ".$this->settings['cashToTime']);
$this->beginTransaction();
try{
$this->freshSession();
if($this->user['coinPassword']!=md5($para['coinpwd'])) throw new Exception('资金密码不正确');
unset($para['coinpwd']);
if($this->user['coin']<$para['amount']) throw new Exception('你帐户资金不足');
目前是24小时制的,我需要的是跨天时间,比如08点到02点,上面是我的PHP代码,请问怎么改?//提示时间检查
$fromTime=strtotime(date('Y-m-d ',$this->time).$this->settings['cashFromTime'].':00');
$toTime=strtotime(date('Y-m-d ',$this->time).$this->settings['cashToTime'].':00');
if($this->time < $fromTime ||$this->time > $toTime ) throw new Exception("对不起,已过提现时间,请在合适的时间提交!<br />提现时间:".$this->settings['cashFromTime']." ~ ".$this->settings['cashToTime']);
$this->beginTransaction();
try{
$this->freshSession();
if($this->user['coinPassword']!=md5($para['coinpwd'])) throw new Exception('资金密码不正确');
unset($para['coinpwd']);
if($this->user['coin']<$para['amount']) throw new Exception('你帐户资金不足');
这是代码