The filesize() function returns the size of the specified file.
If successful, the function returns the file size in bytes. If it fails, returns FALSE.
filesize(filename)
parameter | describe |
---|---|
filename | Required. Specifies the documents to be checked. |
Note: The results of this function will be cached. Please use clearstatcache() to clear the cache.
<?phpecho filesize("test.txt");?>
The above code will output:
20