Typecho添加网站加载时间
直接在主题下的 functions.php 中加入以下代码即可:/** * 加载时间 * @return bool */ function timer_start() { global $timestart; $mtime = explode( ' ', microtime() ); $timestart = $mtime[1] + $mt
直接在主题下的 functions.php 中加入以下代码即可:/** * 加载时间 * @return bool */ function timer_start() { global $timestart; $mtime = explode( ' ', microtime() ); $timestart = $mtime[1] + $mt
代码部署:打开并把代码放到functions.php中即可。(注意:修改代码中的建站时间为你自己的)参考本站及博客。// 运行时间 // 设置时区 date_default_timezone_set('Asia/Shanghai'); /** * 秒转时间,格式 年 月 日 时 分 秒 * * @author Roogle * @return html */ function