• PHP获取今天开始和结束的时间戳


    $t = time();
    $start = mktime(0,0,0,date("m",$t),date("d",$t),date("Y",$t));
    $end = mktime(23,59,59,date("m",$t),date("d",$t),date("Y",$t));

    echo "一周后:".date("Y-m-d",strtotime("+1 week")). "
    ";     
    echo "一周零两天四小时两秒后:".date("Y-m-d G:H:s",strtotime("+1 week 2 days 4 hours 2 seconds")). "
    ";     
    echo "下个星期四:".date("Y-m-d",strtotime("next Thursday")). "
    ";     
    echo "上个周一:".date("Y-m-d",strtotime("last Monday"))."
    ";     
    echo "一个月前:".date("Y-m-d",strtotime("last month"))."
    ";     
    echo "一个月后:".date("Y-m-d",strtotime("+1 month"))."
    ";     
    echo "十年后:".date("Y-m-d",strtotime("+10 year"))."
    ";    

  • 相关阅读:
    tcp socket http(复制的)
    cas php
    占用字节
    网络基础
    Mbps MB/S Mb/s
    path_info和get_full_path()的区别
    rbac权限管理
    ORM _meta
    Django SQLite3的使用
    url的分发
  • 原文地址:https://www.cnblogs.com/xieqian111/p/5359125.html
Copyright © 2020-2023  润新知