php get size of file
snippet in php

php get size of file

user2771

$fileSizeInBytes=filesize("/path/to/myfile.txt"); 

filesize in php

user8852

$file = '/path/to/your/file';
$filesize = filesize($file);
 
echo "The size of your file is $filesize bytes.";