【发布时间】:2013-12-30 11:42:23
【问题描述】:
我的网站中有一小段代码显示了上次修改 index.php 的时间, 它看起来像这样:
<?php
$filename = 'index.php';
if (file_exists($filename)) {
echo "<p style=text-align:center'>$filename was last modified: " .date ("F d Y G:i P ", filemtime($filename));
}
php?>
目前显示为,index.php最后修改时间:2013年12月30日12:36 +01:00
但在 +01:00 结尾处,我想添加文本“GMT”,以便用户知道它是 +1 GMT。
正在努力研究如何在不破坏代码的情况下将其放入其中。
【问题讨论】:
-
你以前用过php吗?还是自己试过?这有点明显......
标签: php date time format last-modified