PHP disk_free_space()Function


PHP Filesystem 参考手册Complete PHP Filesystem Reference Manual

Definition and Usage

The disk_free_space() function returns the available space in the specified directory, in bytes.

Syntax

disk_free_space(directory)

Parameter Description
directory Required. Specifies the directory to be checked.


Example

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

The above code will output:

109693288448


PHP Filesystem 参考手册Complete PHP Filesystem Reference Manual Other Extensions