1. 修改时间格式

    • 在内容页模板中添加以下代码:
      <?php
      $xq = date('Y-m-d', $navinfor['newstime']); // 发布时间
      $y = date('Y', $navinfor['newstime']); // 年份
      $m = date('m', $navinfor['newstime']); // 月份
      $d = date('d', $navinfor['newstime']); // 几号
      $weekarray = array("日", "一", "二", "三", "四", "五", "六");
      $date = $weekarray[date("w", strtotime($xq))];
      ?>

      调用时间

    • 在需要显示时间的地方插入以下代码:
      <?=$y?>年<?=$m?>月<?=$d?>号,星期<?=$date?>