PHP: Afficher l’espace total d’un disque

Author:
<?php
   $systempartitions = array("/", "/home","/usr", "/www");
   foreach ($systempartitions as $partition) {
      $totalSpace = disk_total_space($partition) / 1048576;
      $usedSpace = $totalSpace - disk_free_space($partition) / 1048576;
      echo "Partition: $partition (Espace Total: $totalSpace MB. Espace utilisé: $usedSpace MB.) <BR>";
   }
?>
 
 
           
       

Leave a Reply

Your email address will not be published. Required fields are marked *


three + = 4