PHP filesize() Function
Complete PHP Filesystem Reference Manual
Definition and Usage
The filesize() function returns the size of a specified file.
Returns the file size in bytes on success, or FALSE on failure.
Syntax
filesize(filename)
| Parameters | Description |
|---|---|
| filename | Required. Specifies the file to check. |
Tips and Notes
**Note:** The results of this function are cached. Use clearstatcache() to clear the cache.
Example
The code above will output:
20
Complete PHP Filesystem Reference Manual