[PHP] smarty模板格式化输出Unix时间戳 →→→→→进入此内容的聊天室

来自 , 2019-02-27, 写在 PHP, 查看 147 次.
URL http://www.code666.cn/view/7f141cf8
  1. <p>smarty模板输出:<br />    
  2.    
  3. <br />    
  4.    
  5. 输出数据库保存的时间戳:<{$time|date_format:'%Y-%m-%d %H:%M:%S'}>  
  6.  
  7. <br />    
  8.  
  9. 昨 天:<{$yesterday|date_format:'%Y-%m-%d %H:%M:%S'}>    
  10.    
  11. <br />    
  12.    
  13. 今天:<{$today|date_format:'%Y-%m-%d %H:%M:%S'}>    
  14.    
  15. <br />    
  16.    
  17. 明天:<{$tomorrow|date_format:'%Y-%m-%d %H:%M:%S'}>    
  18.    
  19. </p>    
  20.    
  21. <p>    
  22.    
  23. 昨天:<{$yesterday1|date_format:'%Y-%m-%d %H:%M:%S'}>    
  24.    
  25. <br />    
  26.    
  27. 今天:<{$today1|date_format:'%Y-%m-%d %H:%M:%S'}>    
  28.    
  29. <br />    
  30.    
  31. 明天:<{$tomorrow1|date_format:'%Y-%m-%d %H:%M:%S'}>    
  32.    
  33. </p>    
  34.    
  35. smarty保留变量输出:<{$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}>    
  36.    

回复 "smarty模板格式化输出Unix时间戳"

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

captcha