Output 19346322544 Now let’s use human"/> Output 19346322544 Now let’s use human">

Home >Java >javaTutorial >filectime() function in PHP

filectime() function in PHP

PHPz
PHPzforward
2023-09-08 22:25:021611browse

filectime() function in PHP

The filectime() function returns the last modification time of the file. It returns the last modified time of the file as a UNIX timestamp, or false on failure.

Syntax

filectime ( file_path );

Parameters

  • file_path - The path to the file whose last changed time will be found.

Return

The filectime() function returns the last modified time of the file in the form of a UNIX timestamp, and returns false on failure.

Example

<?php
   echo filectime("info.txt");
?>

Output

19346322544

Now let’s get the last changed time of the file as a date in human readable form.

Example h2>

Live demonstration

<?php
   echo "Last change time of the file: ".date("F d Y H:i:s.",filectime("info.txt"));
?>

Output

Last change time of the file: September 23 2018 08:12:42

The above is the detailed content of filectime() function in PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete