English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP Filesystem Reference Manual
The filesize() function can return the size of the specified file. If successful, this function can return the file size (in bytes), if failed, then return false.
int filesize ( string $filename )
If an error occurs, this function can return the file size (in bytes) or false (and can generate an E_WARNING level error).
<?php $filename = "sample.txt"; echo $filename . ': ' . filesize($filename) . ' bytes'; ?>Test and See‹/›
Output Result
sample.txt: 27 bytes