PHP disk_free_space() Function

Definition and Usage

The disk_free_space() function returns the available space in the directory

Syntax

disk_free_space(directory)
Parameter Description
directory Required. Specifies the directory to be checked.

Description

directory The parameter is a string representing a directory. The function returns the number of available bytes based on the corresponding file system or disk partition.

Example

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

Output:

209693288558