Share on Google+Share on Google+

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

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

Example of filectime() in PHP


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


$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"));



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



Posted on: September 24, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.


Advertisement null