Tutorials Point


  Learning PHP
  Advanced PHP
  PHP Function Reference
  PHP Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

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 Printer Friendly

Advertisements


  

Advertisements