PHP - Function filectime()


Advertisements


Syntax

int filectime ( string $filename )

Definition and Usage

Gets the inode change time of a file.

Parameters

Sr.No Parameter & Description
1

filename

Path to the file.

Return Value

Returns the time the file was last changed, or FALSE in case of an error. The time is returned as a Unix timestamp.

Example

Following is the usage of this function −

<?php
   $filename = "/home/httpd/html/index.php";
   
   if (file_exists($filename)) {
      echo "$filename was last changed: " . date("F d Y H:i:s.", filectime($filename));
   }
?>

php_function_reference.htm