Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

date("H:i:s F d, Y", $statInfo[10]));
}
else
{
// print UNIX version
print("Device: $statInfo[0]
\n");
print("INode: $statInfo[1]
\n");
printf("Mode: %o
\n", $statInfo[2]);
print("Links: $statInfo[3]
\n");
print("UID: $statInfo[4]
\n");
print("GID: $statInfo[5]
\n");
print("Device Type: $statInfo[6]
\n");
print("Size: $statInfo[7] bytes
\n");
printf("Last Accessed: %s
\n",
date("H:i:s F d, Y", $statInfo[8]));
printf("Last Modified: %s
\n",
date("H:i:s F d, Y", $statInfo[9]));
printf("Last Changed: %s
\n",
date("H:i:s F d, Y", $statInfo[10]));
print("Block Size: $statInfo[11]
\n");
print("Blocks: $statInfo[12]
\n");
}
?>


Table 8.7. Array Elements Returned by the stat Function

Element Name Description


0 Device or Drive Letter


This is a number identifying the device of the filesystem. On
Windows this number denotes the drive letter the file is on,
with the A drive being zero.

1 Inode A unique identifier for the file, always zero on Windows. This is the same value you will get from the fileinode function.


2 Mode
This is the same value you will get from fileperms, the
read/write/execute permissions.


3 Number of Links Number of links to file. On Windows, this will always be 1 if the file is not on an NTFS partition.


4 User User ID of the owner, Always zero on Windows. This is the same value you will get from the fileowner function.


5 Group Group ID, always zero on Windows. This is the same value you will get from the filegroup function.


6 Device Type This is the type of the device. number. On Windows it repeats the device


7 Size
Size of the file in bytes, which is the same as reported by
filesize.


8 Last Accessed Last time the file was accessed, fileatime. as defined in the description of


9 Last Modified Last time the file was modified, as defined in the description of filemtime.


10 Last
Changed


Last time the file was changed, as defined in the description of
filectime.\ On Windows this is the time the file was created.
Free download pdf