tags:

views:

47

answers:

4

How to get modified time and size of any file using PHP?

+3  A: 

From php.net http://us.php.net/manual/en/function.stat.php

stat

(PHP 4, PHP 5)

stat — Gives information about a file

Tom Dignan
I Like This......Thanks MAte!!
OM The Eternity
+3  A: 

SplFileInfo provides a high level API to the file system:

$file = new SplFileInfo('path/to/file');
echo $file->getMTime();
echo $file->getSize();
Gordon
That's fancy 3ch
Tom Dignan
A: 

You can use filemtime and filesize functions for that.

More info here

Sarfraz
A: 

you can use this

echo date("m/d/Y",filemtime("latestime.php"));

Praveen kalal