September 2001
Intermediate to advanced
768 pages
32h 45m
English
string filetype(string filename) Retrieves the file type.
Returns:
File type; FALSE on error
Description:
Returns the generic type of the specified file. The information is not as detailed as the UNIX file command.
The available file types are block, char, dir, fifo, file, link, and unknown. The dir, file, and link types correspond to directories, files, and hard or soft links. The block, char, and fifo types refer to various types of devices. Please refer to your system documentation for more details.
Note:
The results of this function are cached. See clearstatcache() for details.
Example:
$filetype = filetype("myfile");
echo ($filetype);
|
Read now
Unlock full access