Easy Tutorial
❮ Func String Strcspn Php Constants ❯

PHP filetype() Function



Definition and Usage

The filetype() function returns the type of the specified file or directory.

If successful, the function returns one of seven possible values. If it fails, it returns FALSE.

Possible return values:

Syntax

Parameter Description
filename Required. Specifies the file to check.

Tips and Notes

Note: The result of this function is cached. Use clearstatcache() to clear the cache.


Example 1

The above code will output:


Example 2

The above code will output:


❮ Func String Strcspn Php Constants ❯