PHP disk_total_space() Function

Definition

The disk_total_space() function returns the total space, in bytes, of the specified directory.

Syntax

PHP disk_total_space() Function has the following syntax.

disk_total_space(directory)

Parameter

ParameterIs RequiredDescription
directoryRequired.Directory to check

Return

PHP disk_total_space() Function returns the total space, in bytes, of the specified directory.

Example

returns the total space, in bytes, for C: drive.


<?php
echo disk_total_space("C:");
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions