PHP lstat() function and example

In this PHP tutorial, we will learn about the PHP lstat() Function in context of file handling. And also we will see the example related to the lstat() function in PHP.

 
 

Share on Google+Share on Google+

PHP lstat() function and example

Ads

In this PHP tutorial, we will learn about the PHP lstat() Function in context of file handling. And also we will see the example related to the lstat() function in PHP.

Syntax for PHP Istat() Function
array
lstat (file_name)

  • PHP Istat() Function states about the regular file and symbolic file information
  • PHP Istat() Function will returns the data in Array form


PHP Istat() Function with Example

Code
<?php

    $ar1
=lstat("bb.txt");

    foreach
($ar1 as $k=>$v )
            {
       echo
"<br>$k--->$v";
           }
?>

Output
0--->2
1--->0
2--->33206
3--->1
4--->0
5--->0
6--->2
7--->100
8--->1252731776
9--->1252731816
10--->1252486471
11--->-1
12--->-1
dev--->2
ino--->0
mode--->33206
nlink--->1
uid--->0
gid--->0
rdev--->2
size--->100
atime--->1252731776
mtime--->1252731816
ctime--->1252486471
blksize--->-1
blocks--->-1

Advertisements

Ads

Posted on: October 30, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles