標(biāo)簽:{$eyou.field.serverTime|getServerTime}
實例:
<meta property="article:modified_time" content="{$eyou.field.serverTime|getServerTime} " />
修改自定義PHP頁:
打開:
\extend\function.php
里面最底下添加以下代碼:
if (!function_exists('getServerTime')) {
function getServerTime() {
$serverTime = date('c'); // 獲取服務(wù)器當(dāng)前時間紅色C 可以替換:“Y-m-d H:i:s“ (2024-11-22 23:30:50)
return $serverTime;
}
function index() {
$serverTime = $this->getServerTime();
echo '服務(wù)器時間:' . $serverTime;
}
}
調(diào)用標(biāo)簽為:{$eyou.field.serverTime|getServerTime}