1.在plugins下面创建一个文件

modifier.changeDate.php

编写:

<?php
function smarty_modifier_changeDate($utime,$format){
    return date($format,$utime);
}
?>

使用:

{$time|changeDate:'Y-m-d H:i:s'}

结果为:

7.modifier插件的自定义和使用

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2022-12-23
  • 2021-08-11
  • 2021-09-15
  • 2021-12-20
  • 2022-12-23
猜你喜欢
  • 2021-11-10
  • 2021-05-19
  • 2021-07-09
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
  • 2022-12-23
相关资源
相似解决方案