The filectime() function, filectime php, filectime() in php


 

The filectime() function, filectime php, filectime() in php

The PHP filectime() Function is used to get the inode change time for a file.

The PHP filectime() Function is used to get the inode change time for a file.

Example of filectime() in PHP

Description

Syntax of filectime() in PHP

int filectime(filename)

It gives the last time when file  was changed.

Changes are meant for inode(user,group,other permission in unix o/s ) and  content 

It returns the time in int if there are changes .Convert them to date format by date function

And FALSE if no changes 

Code of filectime() in PHP

<?php

$time = time();

echo "current date and times is ".date("m/d/y H:i:s ", $time);

echo "<br>current File Access Time is ".date("m/d/y H:i:s ", filectime("c:/rose1/ram.txt"));

?>

Output

current date and times is 09/10/09 10:07:24
current File Access Time is 09/09/09 07:18:31

 

Ads