How to use Filesystem filemtime in PHP

In this article I am going to explain about filemtime function in PHP.
  • 1729

PHP filemtime() Function

The filesystem filemtime function is used to get modification time of the file content.

Syntax of filemtime function

filemtime(filename)

Parameters in filemtime function

It has only one parameter:

Parameter Description
filename It specifies the file to check.

Example of filesystem filemtime function

<html>

<body>
 

<?php

echo filemtime("C:\wamp\www\Dinesh\PhpIntro.txt");

echo "<br />";

echo "The file was last modified: ".date("F d Y H:i:s.",filemtime("C:\wamp\www\Dinesh\PhpIntro.txt"));

?>
 

</body>

</html>


Output:

filemtimefunctionphp.jpg

You may also want to read these related articles :
here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.