<?php
int|false filesize ( str $filename )
where,
$filename = The path to the file
?>
<?php
define("PN", __DIR__ . '/temp/');
$path01 = PN;
$flatm01 = glob($path01 . '*', GLOB_BRACE);
foreach($flatm01 as $k01 => $v01)
{
if(is_file($v01))
{
echo 'The file:<br>' . basename($v01) .
'<br>occupies:<br>' . filesize($v01) . ' bytes.<br><br>';
}
elseif(is_dir($v01))
{
echo 'The directory:<br>' . basename($v01) .
'<br>occupies:<br>' . filesize($v01) . ' bytes.<br><br>';
}
else
{
echo 'The file or directory:<br>' . $v01 .
'<br>does not exist.<br><br>';
}
}
clearstatcache();
?>