Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use fstat() function in php ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 265
    Comment on it

    Hi Reader's,
    Welcome to FindNerd, today we are going to discuss how to use fstat() function in php ?
    The fstat() function is used for returning information about an open file.
    syntax of fstat() function

    fstat(file)
    

    file is a required parameter

    you can see below example:

    <?php
    $file = fopen("file.txt","r");
    print_r(fstat($file));
    fclose($file);
    
    ?>
    

    The output of the code above will be:

    Array ( [0] => 2051 [1] => 5512911 [2] => 33204 [3] => 1 [4] => 1000 [5] => 1000 [6] => 0 [7] => 27 [8] => 1451369215 [9] => 1450245989 [10] => 1450245989 [11] => 4096 [12] => 8 [dev] => 2051 [ino] => 5512911 [mode] => 33204 [nlink] => 1 [uid] => 1000 [gid] => 1000 [rdev] => 0 [size] => 27 [atime] => 1451369215 [mtime] => 1450245989 [ctime] => 1450245989 [blksize] => 4096 [blocks] => 8 ) 
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: