Home > Article > Backend Development > 关于PHP读取时间号码有关问题
关于PHP读取时间号码问题
public function pai3(&$actionNo, &$actionTime, $time=null){<br /> $this->setTimeNo($actionTime, $time);<br /> //echo $actionTime,' ',date('Y-m-d H:i:s', $time);<br /> if($actionTime >= date('Y-m-d H:i:s', $time)){<br /> $actionNo = date('Yz', $time)-6;<br /> }else{<br /> $actionNo = date('Yz', $time)-6;<br /> $actionTime=date('Y-m-d 18:30', $time);<br /> }<br /> }
public function pai3(&$actionNo, &$actionTime, $time=null){<br /> $this->setTimeNo($actionTime, $time);<br /> //echo $actionTime,' ',date('Y-m-d H:i:s', $time);<br /> $year = date('Y', $time);<br /> $day = str_pad(date('z',$time),3,'0',STR_PAD_LEFT);<br /> $times = $year.$day;<br /> if($actionTime >= date('Y-m-d H:i:s', $time)){<br /> <br /> $actionNo = $times-6;<br /> }else{<br /> $actionNo = $times-6;<br /> $actionTime=date('Y-m-d 18:30', $time);<br /> }<br /> }