<?php //将当前时间转換成yyyy-mm-dd格式串,再转换成日期格式,绕了一圈哈 echo strtotime(date('Y-m-d',time()).' 00:00:00'); //将GNU 日期输入格式的字符转换成时间 echo strtotime('now'); //标准的字符串转换成时间 $t = '2012-9-10 15:18:06'; $time = strtotime($t); //将时间转换成日期字符yyyymmdd,再转换成整型格式 $d = intval(date('Ymd',$time)); echo '付款时间:'.$d; ?>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号