Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

filectime

Description

Gets inode change time of file

Syntax

filectime(
    string $filename
): int|false

Parameters

filename

Path to the file.

Return

Returns the time the file was last changed, or false on failure.

The time is returned as a Unix timestamp, which is suitable for the date() function.

Examples

1 · filename

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';

$return = filectime($filename);

echo $return;

?>
1708716607

2 · date

<?

$filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/1.txt';

$return = filectime($filename);

echo "last changed: " . date("Y-m-d H:i:s", $return);

?>
last changed: 2024-02-23 19:30:07
HomeMenu