PHP time 函数– 得到当前时间的时间戳,输出格式为整数
输出结果为从1970年1月1日到当前时间的秒数
<?php $Now = time(); echo 'When this page was loaded, <br>'; echo "$Now seconds had elapsed since January 1, 1970.\n"; ?>
输出结果如下:
When this page was loaded, 1261919872 seconds had elapsed since January 1, 1970.