• PHP Video Tutorials

PHP - Function disk_free_space()



The disk_free_space() function can return the free space of a specified directory in bytes.

Syntax

float disk_free_space ( string $directory )

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

Example

<?php
   echo disk_free_space("C:");
   echo "\n";
   echo disk_free_space("E:");
?gt;

Output

224150941696
209571344384
php_function_reference.htm
Advertisements