【发布时间】:2015-02-22 23:06:33
【问题描述】:
我想删除所有超过 9 天的文件。由于 filectime 返回一个
的创建时间某个文件,因此,我只想知道如何减去一个例子:9天
filectime().
代码:
<?php
$filename = 'JSONFormate.json';
if (file_exists($filename)) {
echo "$filename was last changed: " . date("F D Y H:i:s.", filectime
($filename));
echo "\n......".filectime($filename)-777600;
}
?>
结果 JSONFormate.json 最后更改时间:2012 年 5 月星期二 22:50:10.-777600
【问题讨论】:
标签: php