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


 

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

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

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

Example of fileatime() function in PHP

Description

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

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

?>

Output

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

 

Ads