What is stat in PHP
In this article I am going to explain about stat function in PHP.
PHP stat() Function
The filesystem stat function gives information about a file.
Syntax of stat function
Parameters in stat function
It has only one parameter:
Parameter |
Description |
fileName |
It specifies the path to the file. |
Example of filesystem stat function
<html>
<body>
<?php
$file = stat("C:\wamp\www\Dinesh\PhpIntro.txt");
echo "Inode number".$file['ino']."</br>";
echo "Access time:".$file['atime']."</br>";
echo "Modification time:".$file['mtime']."</br>";
echo "Device number:" . $file['dev']."</br>";
echo "Size in bytes:". $file['size'];
?>
</body>
</html>
|
Output:

You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here