PHP中时间戳的设置方法

时间:2016-11-1355举报小编:youjiejie

    本文实例讲述了PHP中时间戳的设置方法。分享给大家供大家参考,具体如下:

    echo strtotime('now'),'<br>';//现在
    echo strtotime('today'),'<br>';//今天
    echo strtotime('tomorrow'),'<br>';//明天
    echo strtotime('yesterday'),'<br>';//昨天

    运行结果如下:

    1469674869

    1469664000

    1469750400

    1469577600

    今天剩余的秒数:

    echo $time_remain = strtotime('tomorrow') - time();
    //输出:75531

    以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持未来软件园。