php filesize() function
Translation results:
英[saɪz] 美[saɪz]
n. Scale; size, size; glue, paste; huge, large amount
vt. Arrange by size; change the size of... ; Sizing, sizing; coating
adj. Certain size
Third person singular: sizes Plural: sizes Present participle: sizing Past tense: sized Past participle: sized
php filesize() functionsyntax
Function: Return the size of the specified file.
Syntax: filesize(filename)
Parameters:
Parameter | Description |
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() functionexample
<?php $file = filesize("./test.txt"); echo $file; ?>
Run instance»
Click the "Run instance" button to view the online instance
Output:
51