Home > Backend Development > PHP Tutorial > PHP filemtime() function_PHP tutorial

PHP filemtime() function_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:27:30
Original
974 people have browsed it

Definition and Usage

The filemtime() function returns the last modification time of the file content.

If successful, the time is returned as a Unix timestamp. On failure, returns false.

Grammar

filemtime(filename)

Parameters

Description

filename Required. Specifies the documents to be checked.

Description

This function returns the time when the data block in the file was last written, that is, the time when the content of the file was last modified.

Tips and Notes

Tip: The result of this function will be cached. Please use clearstatcache() to clear the cache.

Example

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

Output:

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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/818744.htmlTechArticleDefinition and usage The filemtime() function returns the last modification time of the file content. If successful, the time is returned as a Unix timestamp. On failure, returns false. Syntax 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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template