[PHP] php日期抓取 →→→→→进入此内容的聊天室

来自 , 2019-04-19, 写在 PHP, 查看 119 次.
URL http://www.code666.cn/view/073b00ab
  1. <?php
  2.  
  3. echo j7_getdate('Y-m-d','2010-11-15','+10 day');
  4.  
  5. function j7_getdate($format,$time='now',$opt){
  6.   return date("$format",strtotime("$time $opt"));
  7. }
  8.  
  9. //輸出 2010-11-25
  10. //詳細 strtotime 使用方法
  11. /*
  12. echo strtotime("now"), "\n";
  13. echo strtotime("10 September 2000"), "\n";
  14. echo strtotime("+1 day"), "\n";
  15. echo strtotime("+1 week"), "\n";
  16. echo strtotime("+1 week 2 days 4 hours 2 seconds"), "\n";
  17. echo strtotime("next Thursday"), "\n";
  18. echo strtotime("last Monday"), "\n";
  19. */
  20.  
  21. ?>
  22.  

回复 "php日期抓取"

这儿你可以回复上面这条便签

captcha