PHP disk_free_space() function

Definition and Usage

The disk_free_space() 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 based on the corresponding file system or disk partition.

Example

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

Output:

209693288558