PHP diskfreespace() Function

Definition and Usage

The diskfreespace() function returns the available space in the directory. This function is disk_free_space() Alias of the function.

Syntax

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

Description

directory The parameter is a string of a directory. The function will return the available number of bytes according to the corresponding file system or disk partition.

Example

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

Output:

209693288558