• PHP Video Tutorials

PHP - Function disk_total_space()



The disk_total_space() function can return the total space of a specified directory in bytes.

Syntax

float disk_total_space ( string directory )

Given a string containing a directory, the disk_total_space() function can return the total number of bytes on corresponding filesystem or disk partition.

Example

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

Output

277320036352
209714147328
php_function_reference.htm
Advertisements