Copyright © tutorialspoint.com

PHP Function diskfreespace()

previous
Advertisements

Syntax

float diskfreespace ( string $directory );

Definition and Usage

This function is an alias of: disk_free_space().

Paramters

ParameterDescription
directoryA directory of the filesystem or disk partition.

Return Value

Returns the base name of the given path.

Example

Following is the usage of this function:

<?php
//On windows:
$hdwinC = diskfreespace("C:");
$hdwinD = diskfreespace("D:");
echo "Diskspace left on C: $hdwinC";
echo "Diskspace left on D: $hdwinD";

//Linux:
$hdGnu = diskfreespace("/");
echo "Diskspace left on / $hdGnu";
?>
previous

Copyright © tutorialspoint.com