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)
Parameters Description
directory Required. Specifies the directory to be checked.

Description

directory The parameter is a string of a directory. This 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