Share on Google+Share on Google+

The PHP fileatime() function , fileatime php, fileatime in php

The PHP fileatime() function gives the time of last access of the file.

Example of fileatime() function in PHP


Syntax for fileatime() Function PHP

int fileatime ( file_name )

It returns Last Access time in int form of a file

so converts in date form by the date function

Code for fileatime() Function 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 ", fileatime("c:/rose1/ram.txt"));



current date and times is 09/10/09 09:48:57
current File Access Time is 09/10/09 09:44:23



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.