English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Basic PHP Tutorial

Advanced PHP Tutorial

PHP & MySQL

PHP Reference Manual

Usage and Examples of PHP diskfreespace() Function

PHP Filesystem Reference Manual

The diskfreespace() function can return the available space of the specified directory in bytes. This function is an alias of the disk_free_space() function.

Syntax

diskfreespace(directory)

Online Example

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

Output Result

224159571968
209571344384

PHP Filesystem Reference Manual