PHP filesize() Function

PHP filesize Function


Definition : 

The PHP filesize() function returns the size for the given file.

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

Syntax

  filesize(filename)

Parameter 
Parameter Description
filename Required. Specifies the path to the file to check

Given below example Return the file size for "demo.txt":

Output : demo.txt contains: 18 bytes