PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Nitesh Apte   Disk Usage   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: example
Class: Disk Usage
Calculate the disk space usage of a directory
Author: By
Last change: c
Date: 13 years ago
Size: 351 bytes
 

Contents

Class file image Download
<?php
include 'class.DiskUsage.php';

$obj = new DiskUsage;

$path= "/var/www/example/";
$size = $obj->_directorySize($path);

echo
"<h4>Details for the path : $path</h4>";
echo
"Total size : ".$obj->_sizeFormat($size['size'])."<br>";
echo
"No. of files : ".$size['count']."<br>";
echo
"No. of directories : ".$size['dircount']."<br>";
?>