php filesize() function is used to obtain the file size.
php filesize() function Syntax
Function: Return the size of the specified file.
Syntax:
filesize(filename)
Parameters:
filename Required. Specifies the documents to be checked.
Description: If successful, the number of bytes of the file size is returned. On failure, returns false and generates an E_WARNING level error.
php filesize() function example
<?php $file = filesize("./test.txt"); echo $file; ?>
Output:
51
This article is an introduction to the PHP filesize function. I hope it will be helpful to friends in need!
The above is the detailed content of How to use filesize function. For more information, please follow other related articles on the PHP Chinese website!