Jump to content

Help with space


whelpton

Recommended Posts

I had this little snippet tucked away. It should help you.

<?php
$path = "gal";
echo "Folder $path = ".filesize_r($path)." bytes";

function filesize_r($path){
  if(!file_exists($path)) return 0;
  if(is_file($path)) return filesize($path);
  $ret = 0;
  foreach(glob($path."/*") as $fn)
    $ret += filesize_r($fn);
  return $ret;
}
?>

Link to comment
https://forums.phpfreaks.com/topic/99313-help-with-space/#findComment-508135
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.