/ Published in: PHP
Función para obtener el tamaño de un directorio:
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function dirSize($directory) { $size = 0; foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory)) as $file){ $size+=$file->getSize(); } return $size; }