PHP filemtime() 函数
PHP 教程
· 2019-01-24 23:13:16
定义和用法
filemtime() 函数返回文件内容的上次修改时间。
如果成功,该函数将以 Unix 时间戳形式返回文件内容的上次修改时间。如果失败,则返回 FALSE。
语法
filemtime(filename)
| 参数 | 描述 |
|---|---|
| filename | 必需。规定要检查的文件。 |
提示和注释
注释:该函数的结果会被缓存。请使用 clearstatcache() 来清除缓存。
实例
<?php
echo filemtime("test.txt");
echo "<br />";
echo "Last modified: ".date("F d Y H:i:s.",filemtime("test.txt"));
?>
上面的代码将输出:
1139919766 Last modified: February 14 2006 13:22:46.
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
The Little MLer
Matthias Felleisen、Daniel P. Friedman、Duane Bibby、Robin Milner / The MIT Press / 1998-2-19 / USD 34.00
The book, written in the style of The Little Schemer, introduces instructors, students, and practicioners to type-directed functional programming. It covers basic types, quickly moves into datatypes, ......一起来看看 《The Little MLer》 这本书的介绍吧!