Title:Using the PHP stat FunctionContributor: Randall Goguen (aka Ranman)
Last Update: Tuesday July 11 16:43 EDT 2000
<?
$file_name = "index.html";
$these_stats = stat($file_name);
echo "Status of file <B>$file_name</B><P>
<B>Device:</B> $these_stats[0]<BR>
<B>Inode:</B> $these_stats[1]<BR>
<B>Inode protection mode:</B> $these_stats[2]<BR>
<B>Number of links:</B> $these_stats[3]<BR>
<B>User id of owner:</B> $these_stats[4]<BR>
<B>Group id owner:</B> $these_stats[5]<BR>
<B>Device type if inode device:</B> $these_stats[6]<BR>
<B>Size in bytes:</B> $these_stats[7]<BR>
<B>Time of last access:</B> $these_stats[8]<BR>
<B>Time of last modification:</B> $these_stats[9]<BR>
<B>Time of last change:</B> $these_stats[10]<BR>
<B>Blocksize for filesystem I/O:</B> $these_stats[11]<BR>
<B>Number of blocks allocated:</B> $these_stats[12]<BR>";
?>
Anyone who wishes to make additions or changes to this
PHP Tip email them to webmaster@linuxguruz.org
This document is Copyright (c) 1999, 2000 by LinuxGuruz