disk_total_space in PHP

Syntax of disk_total_space in PHP

float disk_total_space(string path)

Returns the number of bytes of total space available (including both used and free) on the disk partition or filesystem at path.

Example of disk_total_space

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

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

Leave a Comment