Web | This Site

Learning PHP
Advanced PHP
PHP Function Reference
PHP Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM

| Home |  | References |  | Discussion Forums |  | About TP

# PHP Function disk_total_space()

## Syntax

float disk_total_space ( string $directory );

## Definition and Usage

Given a string containing a directory, this function will return the total number of bytes on the corresponding filesystem or disk partition.

## Paramters

Parameter | Description
--- | ---
directory | A directory of the filesystem or disk partition.

## Return Value

Returns the total number of bytes as a float.

## Example

Following is the usage of this function:

    <?php
    // $df contains the total number of bytes available on "/"
    $df = disk_total_space("/");

    // On Windows:
    disk_total_space("C:");
    disk_total_space("D:");
    ?>

Advertisement

Online Image Processing

Indian Baby Names