PHP filetype() Function
❮ PHP Filesystem ReferenceDefinition and Usage
The filetype() function returns the file type of a file.
Possible return values:
- fifo
- char
- dir
- block
- link
- file
- socket
- unknown
Note: The result of this function is cached. Use clearstatcache() to clear the cache.
Syntax
filetype(filename)
Parameter Values
Parameter | Description |
---|---|
filename | Required. Specifies the file to check |
Technical Details
Return Value: | One of the file types on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
More Examples
❮ PHP Filesystem Reference