使用 PHP 为时间添加 30 秒 [英] Add 30 seconds to the time with PHP
本文介绍了使用 PHP 为时间添加 30 秒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何给这个时间增加 30 秒?
How can I add 30 seconds to this time?
$time = date("m/d/Y h:i:s a", time());
我不知道该怎么做,因为它显示了很多不同的时间单位,而我只想添加 30 秒.
I wasn't sure how to do it because it is showing lots of different units of time, when I only want to add 30 seconds.
推荐答案
$time = date("m/d/Y h:i:s a", time() + 30);
这篇关于使用 PHP 为时间添加 30 秒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文