PHP filesize () function
Definition and Usage
filesize () function returns the specified file size.
If successful, the function returns the number of bytes in the file size. If it fails, it returns FALSE.
grammar
filesize(filename)
参数 | 描述 |
---|---|
filename | 必需。规定要检查的文件。 |
Tips and Notes
Note: The results of this function are cached.Use clearstatcache () to clear the cache.
Examples
<?php
echo filesize("test.txt");
?>
echo filesize("test.txt");
?>
The code above will output:
20
Complete PHP Filesystem Reference Manual