PHP filemtime() 函数_PHP教程

WBOY
Release: 2016-07-13 10:27:30
Original
798 people have browsed it

 定义和用法

filemtime() 函数返回文件内容上次的修改时间。

若成功,则时间以 Unix 时间戳的方式返回。若失败,则返回 false。

语法

filemtime(filename)

 

参数

描述

 

filename    必需。规定要检查的文件。    

说明

本函数返回文件中的数据块上次被写入的时间,也就是说,文件的内容上次被修改的时间。

提示和注释

提示:本函数的结果会被缓存。请使用 clearstatcache() 来清除缓存。

例子

echo filemtime("test.txt");
echo "Last modified: ".date("F d Y H:i:s.",filemtime("test.txt"));
?>

输出:

1139919766
Last modified: February 14 2006 13:22:46.

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/818744.htmlTechArticle定义和用法 filemtime() 函数返回文件内容上次的修改时间。 若成功,则时间以 Unix 时间戳的方式返回。若失败,则返回 false。 语法 filemtim...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!