strtotime('now')strtotime('today')strtotime('tomorrow')strtotime('yesterday')strtotime(date('Y-m-d', strtotime('+1 day')))strtotime('tomorrow') - time()strtotime(”2009-1-22″)strtotime(”+1 day”)date(”Y-m-d H:i:s”,time())date(”Y-m-d H:i:s”,strtotime(”+1 day”))strtotime(”-1 day”)date(”Y-m-d H:i:s”,time()) date(”Y-m-d H:i:s”,strtotime(”-1 day”))strtotime(”+1 week”)date(”Y-m-d H:i:s”,strtotime(”+1 week”))strtotime(”-1 week”)date(”Y-m-d H:i:s”,strtotime(”-1 week”))strtotime(”next Thursday”)date(”Y-m-d H:i:s”,strtotime(”next Thursday”))strtotime(”last Thursday”)date(”Y-m-d H:i:s”,strtotime(”last Thursday”))strtotime能将任何英文文本的日期时间描述解析为unix时间戳;
结合mktime()或date()格式化日期时间获取指定的时间戳,实现所需要的日期时间。
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号