- 讲师:刘萍萍 / 谢楠
- 课时:160h
- 价格 4580 元
特色双名师解密新课程高频考点,送国家电网教材讲义,助力一次通关
配套通关班送国网在线题库一套
解析: <pre ><code class=方法一: <?php class Dtime { function get_days($date1, $date2) { $time1 = strtotime($date1); $time2 = strtotime($date2); return ($time2-$time1)/86400; } } $Dtime = new Dtime; echo $Dtime->get_days(’2007-2-5′, ’2007-3-6′); ?> 方法二: <?php $temp = explode(‘-’, ’2007-2-5′); $time1 = mktime(0, 0, 0, $temp[1], $temp[2], $temp[0]); $temp = explode(‘-’, ’2007-3-6′); $time2 = mktime(0, 0, 0, $temp[1], $temp[2], $temp[0]); echo ($time2-$time1)/86400; 方法三:echo abs(strtotime(“2007-2-1″)-strtotime(“2007-3-1″))/60/60/24 计算时间差"php hljs">方法一: <?php class Dtime { function get_days($date1, $date2) { $time1 = strtotime($date1); $time2 = strtotime($date2); return ($time2-$time1)/86400; } } $Dtime = new Dtime; echo $Dtime->get_days(’2007-2-5′, ’2007-3-6′); ?> 方法二: <?php $temp = explode(‘-’, ’2007-2-5′); $time1 = mktime(0, 0, 0, $temp[1], $temp[2], $temp[0]); $temp = explode(‘-’, ’2007-3-6′); $time2 = mktime(0, 0, 0, $temp[1], $temp[2], $temp[0]); echo ($time2-$time1)/86400; 方法三:echo abs(strtotime(“2007-2-1″)-strtotime(“2007-3-1″))/60/60/24 计算时间差</code></pre>
课程专业名称 |
讲师 |
课时 |
查看课程 |
---|
课程专业名称 |
讲师 |
课时 |
查看课程 |
---|
点击加载更多评论>>