标签:{$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'); // 获取服务器当前时间红色C 可以替换:“Y-m-d H:i:s“ (2024-11-22 23:30:50)
return $serverTime;
}
function index() {
$serverTime = $this->getServerTime();
echo '服务器时间:' . $serverTime;
}
}
调用标签为:{$eyou.field.serverTime|getServerTime}