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
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.