Home Tutorial Php Phpfiles The PHP fileatime() function , fileatime php, fileatime in php

 
 

The PHP fileatime() function , fileatime php, fileatime in php
Posted on: September 24, 2009 at 12:00 AM
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

 

Related Tags for The PHP fileatime() function , fileatime php, fileatime in php:


Ask Questions?

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.