php 将时间格式 转为时间戳

 1 <?php
 2 $gte = "2018-08-08";
 3 
 4 $year=((int)substr($gte,0,4));//取得年份;
 5 
 6 $month=((int)substr($gte,5,2));//取得月份;
 7 
 8 $day=((int)substr($gte,8,2));//取得几号;
 9 
10 $check_time = mktime(0,0,0,$month,$day,$year);

猜你喜欢

转载自www.cnblogs.com/gaogaoxingxing/p/9046705.html