Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Get Disk total space

Sun Oct 26, 2008 8:50 pm

Code:
<?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 (Allocated: $totalSpace MB. Used: $usedSpace MB.) <BR>";
   }
?>




Post a reply
  Related Posts  to : Get Disk total space
 diskfree and disk total from cdr's     -  
 Get disk free space for Unix-Linux in php     -  
 hi i need ppt for space mouse.     -  
 Fixed Space Using imageTTFbbox()     -  
 White space link example     -  
 getting gst, pst total to diplay in my javascript form     -  
 calculates the total cost with javascript     -  
 total ocurrence of substring in sting     -  
 calculate the total type of stocks     -  
 preserve the white space with-in the body tag     -  

Topic Tags

PHP Files and I/O