The filesize() function returns the size of the specified file.This function returns the file size in bytes on success or FALSE on failure.
int filesize ( string $filename )
Gets the size for the given file.
Parameter | Description |
---|---|
filename | Required. Specifies the file to check |
The result of this function are cached. Use clearstatcache() to clear the cache.
Returns the size of the file in bytes, or FALSE (and generates an error of level E_WARNING) in case of an error.
Because PHP's integer type is signed and many platforms use 32bit integers, some filesystem functions may return unexpected results for files which are larger than 2GB.