Home Menu

disk_free_space

Returns available space on filesystem or disk partition

Syntax

disk_free_space ( string $directory ) : float

Parameters

directory

A directory of the filesystem or disk partition.

Note: Given a file name instead of a directory, the behaviour of the function is unspecified and may differ between operating systems and PHP versions.

Return

Returns the number of available bytes as a float or FALSE on failure.

Examples

1

<?

$directory = "/";

$return = disk_free_space($directory);
echo $return;

?>
946895912960

2

<?

// windows
$directory = "C:";

$return = disk_free_space($directory);
echo $return;

?>
946895912960

PHP

JesusBible
HTMLCSSJSPHPSVGMore
AboutTerms