What is stat in PHP

In this article I am going to explain about stat function in PHP.
  • 1238

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




$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'];






You may also want to read these related articles :

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here


More Articles

© 2020 DotNetHeaven. All rights reserved.