Home  >  Article  >  Backend Development  >  How to use filemtime function

How to use filemtime function

藏色散人
藏色散人Original
2019-02-15 11:22:482989browse

php filemtime() function is used to obtain the file modification time.

How to use filemtime function

php filemtime() function Syntax

Function: Return the last modification time of the file content.

Syntax:

filemtime(filename)

Parameters:

filename required. Specifies the documents to be checked.​

Note: If successful, the time will be returned as a Unix timestamp. On failure, returns false.

php filemtime() function example

<?php
$file = filemtime("./test.txt");
echo "文件上一次修改的时间为:".$file;
?>

This article is an introduction to the PHP filemtime function. I hope it will be helpful to friends in need!

The above is the detailed content of How to use filemtime function. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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