i need help with disk_total_space function..
i have this on my code
According to the docs for disk_total_space(), the value returned is for the filesystem the directory is located on. It doesn't count the space used in a directory + its subdirectories.
You could shell out to du
or for a more portable solution:
$total = 0;
foreach (new RecursiveDirectoryIterator($dir) as $entry)
{
if ($entry->isFile())
$total += $entry->getSize();
}