标签 日期显示方式 下的文章

把下面实例代码另存为 time.php 在程序根目录的index.php 加入 include PHPCMS_PATH.'/time.php'; 在显示时间的位置加入 时间调用代码{formatTime($r[inputtime],1)}另外加两个代码function formatTime($date) { $str = ''; $timer = strtotime($date); $diff = $_SERVER['REQUEST_TIME'] - $timer; $day = floor($diff / 86400); - 阅读剩余部分 -