php get file size from path code example
Example 1: filesize in php
$file = '/path/to/your/file';
$filesize = filesize($file);
echo "The size of your file is $filesize bytes.";
Example 2: filesize in php
$file = '/path/to/your/file';
$filesize = filesize($file); // bytes
$filesize = round($filesize / 1024, 2); // kilobytes with two digits
echo "The size of your file is $filesize KB.";